Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Page Layout / March 2007

Tip: Looking for answers? Try searching our database.

Find a picture in a document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patrick C. Simonds - 29 Mar 2007 03:56 GMT
I have inserted some pictures in a document and I need to be able to use a
macro to select the pictures individually. What I do not know is how to
determine the picture name in the document so that the macro can select the
picture.. The code would look like: ActiveDocument.Shapes("picture
4").Delete
macropod - 29 Mar 2007 11:50 GMT
Hi Patrick,

With pictures linked to the original image files, you can always use the image's filename.

With embedded pictures, however, unless you use vba to assign meaningful names to embedded pictures, you'll likely find yourself
trying to push a piece of string up a hill. That's because Word assigns the picture numbers according to the order in which they
were inserted into the document, irrespective of their relative locations. That and, if you delete one, the unused number doesn't
get reused. On the whole, therefore, you're likely to be better off working via the picture's location in the document. Even then,
if you've got more than one picture anchored to the same location, you'll be back to working with the insertion order unless you
start comparing page positions.

Cheers
Signature

macropod
[MVP - Microsoft Word]
-------------------------

>I have inserted some pictures in a document and I need to be able to use a macro to select the pictures individually. What I do not
>know is how to determine the picture name in the document so that the macro can select the picture.. The code would look like:
>ActiveDocument.Shapes("picture 4").Delete

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.