FileSaveAsWordDocx and FileSaveAsWordDotx commands not executed in VBA

J

Julian Ladbury

I want to prevent a Word 2007 user from saving a document in Word 2007
format. I followed the instructions at
http://msdn.microsoft.com/en-us/library/bb208951.aspx and wrote routines
FileSaveAsWordDocx and FileSaveAsWordDotx. However, these are not executed
as expected. FileSave, FileSaveAs, and FileSaveAll routines in the document
are executed as expected.

I have uploaded a file which reproduces the problem to
http://cid-75e3e350f569b887.skydriv...rd2007 Override FileSave commands problem.doc.

When considering any circumventions, please note that I require one which
can be implemented entirely in VBA without needing any Ribbon XML (I have
http://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/4a6e5478-3eb5-4a20-b5dd-3e1c93ebcc14/
in mind)
 
J

Jay Freedman

The problem is that you got the macro names wrong. For those two, there should
not be any "As" in the name. Rename them as FileSaveWordDocx and
FileSaveWordDotx, and they'll run as expected.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all
may benefit.
 
J

Julian Ladbury

Jay,

Many thanks for pointing out my error, the result of an inattentive
Cut&Paste job and my failure to read what was in front of my eyes.

Case closed!
Julian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top