View Single Post
 
Old 01-24-2012, 01:29 AM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Jamal,

1. The procedure for adding the code to a particular document, instead of to the Normal template, is exactly the same. However, every reference to 'ActiveDocument' should be changed to 'ThisDocument'.
2 & 3. That is correct.
4. You can store the code in doc or docm files, not in docx files
5. Your comment is contradictory:
Quote:
It is working very well when the document is saved but unfortunately it doesn’t work when it is saved, saved as or printed
Does it work when saving, or does it not? AFAIK, the 'wdApp_DocumentBeforeSave' module, if correctly implemented in a Class Module, should work for both 'Save' and 'Save As' procedures.

As I am travelling, I am not in a position to review this matter more fully right now.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote