How can I find out what a macro does without exposing myself to it?
Just to expound on top of these previous posts -
Here is the process I followed -
- Open file
- Enable Editing to get out of protected view
- AltF11 to open the Visual Basic editor
- Sometimes you can apparently view the macros here, in my Word 2013 I could not.
- Minimize or close the VB editor window. We'll reopen in a minute
- Hold Shift while you click
Enable Content
. This will keep it from running AutoOpen macros. - AltF11 to open the Visual Basic editor.
- Now you may see the macros that you didn't see before.
I just ran a test. I opened Word (2007) and:
- Created a simple macro and saved with the document as a "Word macro enabled document (.docm)"
- Went into the security settings (Office Button 'File'\Word Options\Trust Center\Trust Center Settings\Macros Settings) and clicked the "Disable all macros with notification" radio button which will prevent macros from running unless you click the button to allow them to run.
- Opened the *.docm document and the macro didn't run, but I was able to go to the "View" tab on the ribbon control and click the Macros button and view Macros and then edit the macro to open a VBA IDE to see the macro code.
This all assumes you are using Word 2007, although I'd expect the same capability in the last version or two of Word. I don't have Open Office on this box, but, I'd also expect it to have the same functionality.
Good Luck!
The .???x is just a zip-format.
unzip the file and you end up with something like this:
.
├── [Content_Types].xml
├── docProps
│ ├── app.xml
│ ├── core.xml
│ └── custom.xml
├── _rels
└── word
├── document.xml
├── fontTable.xml
├── _rels
│ ├── document.xml.rels
│ └── vbaProject.bin.rels
├── settings.xml
├── styles.xml
├── theme
│ └── theme1.xml
├── vbaData.xml
├── vbaProject.bin
└── webSettings.xml
now u can analyse the vbastuff with Texteditor or other VBA-Editor of your choice.