hj_daisy
asked on
Getting shape picture name using Word VBA (2003)
In a Word 2003 document, I have a shape that I have already inserted a picture into using the Fill Effects option and then selecting an external picture. Let's say I have created a circle shape and inserted an image called 'Grey background.gif'.
I need the Word VBA code that will tell me the name of the picture inserted into the shape because my macro will change it if it says 'Grey background.gif' but will not change it if it says something else. I can't store the name of the picture anywhere such as in a document property etc because the user may change it manually and I won't know what they have inserted.
Thanks for your help.
I need the Word VBA code that will tell me the name of the picture inserted into the shape because my macro will change it if it says 'Grey background.gif' but will not change it if it says something else. I can't store the name of the picture anywhere such as in a document property etc because the user may change it manually and I won't know what they have inserted.
Thanks for your help.
ASKER
Hi GrahamSkan
How can I link the file so that your macro will get the filename?
It's strange that it would show the filename in the dialog box where you select the image to be inserted into the shape yet it doesn't know how to get that information.
I have attached a document showing the screen that I'm referring to.
Picture-in-shape.doc
How can I link the file so that your macro will get the filename?
It's strange that it would show the filename in the dialog box where you select the image to be inserted into the shape yet it doesn't know how to get that information.
I have attached a document showing the screen that I'm referring to.
Picture-in-shape.doc
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Found round about solution
Open in new window