Maybe.
It is definitely able to be done in a macro, but hopefully your security setting should automatically warn you before it is a problem.
By default Word and the other Office packages should be set up to not allow macros to run automatically. It is entirely possible though that someone set your copy of Word to run untrusted code automatically which is the worst thing you can do. By default you should get a warning bar stating that the document has macros that need permission to run. You should hopefully see something like this between the ribbon toolbar and your document:
The document extension also matters. If someone has sent you a a file with a docx
or dotx
extension then these should not have macros in them and Word will warn you if they do.
In newer versions of Word you should, in theory, not be able to save or load a document as docx
or dotx
with macros enabled. A macro enabled document has the extension docm
or dotm
. Renaming a docm
to docx
should give you a security warning when you load the document.
Macro enabled office documents should also have an exclamation point on them to clearly denote that they may run untrusted code.
There is no way to see this quickly with older .doc
files, note there is no "x" or "m" at the end of the file extension.
The best thing you can do is to disable macros entirely and then enable the developer tab. Clicking the "VBA" button on the developer tab will allow you to browse the document to see if it has any active code.
This advice doesn't address any exploits or malformed documents created by nefarious parties that may somehow be able to abuse the system to circumvent restrictions.
You should always be wary of documents given to you by strangers and only open documents you trust.
1
Jut to add that Macro can do A LOT of things. Lots of malware comes from office documents with the macro enabled sent as phishing attack to various organisation. Info from Norton - https://us.norton.com/internetsecurity-malware-macro-viruses.html (no not affiliated with norton)
– Darius – 2018-02-16T03:34:51.570