Good show Doctor. I originally tried VARTYPE() and it did not work.
With over 1,000 objects I did not like spinning thru all the controls - too slow.
TYPE() worked and I thank you very much...
>>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?
>
>I think this might work too :
>
>if type("oWord.CommandBars('myNewToolbar')") = 'O'
>
>Cetin