How can I test for Word XP/2003 options in Word 2000?

N

Nick Murray

Hi,

I have a macro that needs to run under Word 2000, XP and 2003.

I want to turn off "keep track of formatting".

The following code excerpt will do it under Word XP/2003, but fails under
Word 2000 because the properties of Options don't exist. What puzzles me is
that I'm testing for the version of Word....is it failing because Word 2000
has to compile the macro anyway???

if Left$(Application.Build, 1) = "9" then 'other tests for Word XP/2003
here
' Word 2000
With Options
.PromptUpdateStyle = False
.FormatScanning = False
.ShowFormatError = False
End With
End if

Is there a way of telling Word 2000 to ignore these properties, or of
getting a macro to compile under different versions of Word ****when there
are different properties involved****?

thanks for any assistance,

Nick
 
W

Word Heretic

G'day "Nick Murray" <[email protected]>,

You have to use #IF compiler statements to not compile the code that
exists for higher versions of Word.


Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Nick Murray reckoned:
 
N

Nick Murray

Steve,

It works a treat! Thanks!

I'd completely forgotten about #If ...#end if

You're a legend :)

Nick
 
W

Word Heretic

G'day "Nick Murray" <[email protected]>,

Flattery will get you everywhere <chuckles>

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Nick Murray reckoned:
 

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