View Single Post
 
Old 11-30-2013, 02:55 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

OK, but your new code doesn't test the document format, (i.e. RTF), which you previously specified as a requirement.

As a side note, your two 'Docname Like' tests could be reduced to:
Code:
If Docname Like "*[Cc]ontract*" Then  Call contractchange
Finally, you'll note that my code passed the document reference from the Document_Open macro to FoodAndBeverageMacro. That ensures that, if you have two or more documents open, only the one that is subject to the Document_Open macro and to which FoodAndBeverageMacro should apply can be processed.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote