I have code (In This document) that I want to run each time eth Dc is saved. The code works when I run it manually but not when I save eth docm file.
What do I need to do
thanks
Allister
I have code (In This document) that I want to run each time eth Dc is saved. The code works when I run it manually but not when I save eth docm file.
What do I need to do
thanks
Allister
word does not have method called SaveAsHTMLBeforesave .
this is what u need i think
https://docs.microsoft.com/en-us/off...mentbeforesave
I thought it worked but not yet - new file attached
Does anyone know why ?
Thanks
Last edited by AllisterB; 03-02-2021 at 08:24 PM.
As you have already been told, there is no such event as SaveAsHtmBeforeSave in MS Word. And, even if it did have one, you have not initiated the event handler correctly. You don't even have 'Public WithEvents appWord As Word.Application' in the required Class Module.
For the correct way to implement such events as Word does have, see: https://wordmvp.com/FAQs/MacrosVBA/AppClassEvents.htm. To the extent it's relevant, you need to employ Word's DocumentBeforeSave event - which you cannot simply rename.
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Thank you for the article.
It refers to place a file in words startup directory. If I do this will it work for other people I distribute it too if they are on separate systems from mine?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks