Link to home
Start Free TrialLog in
Avatar of r_johnston
r_johnston

asked on

VBA Functions not transferring / functioning from .dotm to .docx

Hello Experts,

DocumentBeforeSave, DocumentBeforeClose, DocumentChange functionality not working in .docx, but works in .dotm.

How does one make it work?  Help!

The attached file will need its extension changed from .zip to .dotm...
ECT.zip
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

It might be macro security.  

Check File, Options, Trust Center, Trust Center Settings button (bottom right), Macro setting (left)

http://www.techtoolsforwriters.com/enable-word-to-run-macros/
Avatar of Norie
Norie

A document with the file extension docx is not macro enabled, to enable macros you need to use the extension docm.

A file with the extension dotm is a macro enabled template.

PS There's no attachment.
When creating a new document from a template, macro code is not reproduced in the new document, so code will not be saved in the document.

Instead the original template becomes the 'attached' template. A reference is set, so that if the parent template can be found, the code and the styles are available to the child document. If not available, the users's Normal template will be referenced.
ASKER CERTIFIED SOLUTION
Avatar of r_johnston
r_johnston

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of r_johnston

ASKER

See above