I can give you a VBScript called OffScrub07.vbs. It is what our MS consultant gave us. I can't find it anywhere online just references to it. We moved from 2013 to 2016 and have been using the OffScrub13.vbs script without issue.
Here is an article on a 2010 to 2013 migration that may help.
And a "fixit" for uninstalling 2007.
If you go to the link BGCBates posted, https://support.microsoft.com/en-us/kb/971179
Grab the "Fix its" and extract them, you will get the "OffScrub" vbs files
We then used a WiseScript to make an .exe that calls and runs all of the Office Scrub scripts for ProPlus and Standard versions of the suites for Office 2003, 2007, 2010 and 2013 (most of our systems have Office 2010, but there's always the oddball with others)
Next in our WiseScript .exe we call the Office 365 installer and .xml, if using the Portal, this does it from our package server
We will be pushing O365 as a 'patch' to those systems that did not user self update in early 2017, for those we will stage the entire package out to the clients a head of time and then over a weekend, enable Auto-Fix and or do a "push"
This gave me an idea of what to do. I now have a package that uninstalls 2007 and install 2016 silently.