Why does this piece of code work with Word 97 but not Word 2000 
Author Message
 Why does this piece of code work with Word 97 but not Word 2000

In one of my applications I use the addin template methode and than have the
toolbar available from that template. The line .CommandBars("MyBar").Enabled
= True is the code that doesn't work with word 2000. The .Commandbars.count
is always 107 regardless if I add other templates using the Addin methode.
This works in Word 97 however in Word 2000 it does not work and I get the
invalide procedure error message. This is the code in question:

Constant MYTEMPLATE = "C:\mytemplate.dot"

Set appWD = GetObject("", "Word.Application")
With appWD
' Add MyTemplate to Word
.AddIns.Add MYTEMPLATE, Install:=True
.CommandBars("MyBar").Enabled = True
End With



Mon, 24 Feb 2003 21:01:42 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Passing Userforms to subs (Word 2000 and 2002, I did not try Word 97)

2. Convert Word 97 WordBasic to Word 2000 VB code

3. vba problem word 97 and not word 2000

4. My Word 97 macros don't run in Word 2000

5. Diffs Between Word 2000 and Word 97?

6. Differences between VBA for Word 2000 and Word 97

7. Word 2000 and Word 97

8. Word 97 & Word 2000

9. display under Word 97 & Word 2000

10. Word 2000 and Word 97 -- how to?

11. Word 97 vs Word 2000 question

12. Word 97 --> Word 2000 problem

 

 
Powered by phpBB® Forum Software