Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding Custom CommandBar in Word?
Message
From
06/03/2003 10:18:44
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/03/2003 09:27:01
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00762136
Message ID:
00762175
Views:
14
>I need to add a custom toolbar in Word via automation only if it does not already exist. However, if I check to see if Word's commandbar already exists I get error number 1426. Here is the code I am using:
>
>
>oWord = CREATEOBJECT('Word.Application')
>ox = oWord.CommandBars('myNewToolbar')
>
>
>Is there a better way to check and see if the toolbar already exists?
local llExists
for each cbar in oWord.CommandBars
 if lower(cbar.Name) = 'mynewtoolbar'
   llExists = .t.
   exit
 endif
endfor
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform