Getting the Picture property
What's the way to find out if there is a picture on a command button or not ?
I have been trying different ways to retrieve the 'Picture' property but it does not seem to be working.
1. Set obj = VbWindow("XXX").ActiveX("Command1").Object.Picture - returns a General error since the Picture object is not returned which is not suported in VBScript.
2. Adding 'Picture' proeprty to the Object Identification section and then using the code
Set chk = VbWindow("XXX").ActiveX("Command1")
If chk.GetROProperty("picture")="Object Reference" Then
Msgbox "No Picture"
Msgbox "Picture is there"
does not work since it always returns 'Object Reference'.
Can someone suggest anyother way ?