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 / Programming / October 2006

Tip: Looking for answers? Try searching our database.

Code problem Word 2007

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patrick Simonds - 01 Oct 2006 00:21 GMT
I have a template document which has on it a signature block. I have placed
to scanned signature graphics in the signature block and depending on which
option I chose (Self, Spouse) when completing the template, one of the lines
of text below would delete the signature which was not required. Every thing
worked fine until I loaded the latest version of Word 2007 and now the macro
will not delete the signature. Now I get an error which says the item
(picture 3, picture 4) wasn't found.

I assume that Word assigned the name "picture 3" and "picture 4" to the
graphics (and maybe it has now assigned them another name). How do I
determine the name of each graphic? Can I assign each graphic a more
meaningful Name, such as "Wife Signature" "My Signature"

ActiveDocument.Shapes("picture 3").Delete
ActiveDocument.Shapes("picture 4").Delete
Cindy M. - 02 Oct 2006 10:48 GMT
Hi Patrick,

> I have a template document which has on it a signature block. I have placed
> to scanned signature graphics in the signature block and depending on which
[quoted text clipped - 9 lines]
> meaningful Name, such as "Wife Signature" "My Signature"
>  
I think your guess is probably on-target. You should be able to assign a name
like this:
   ActiveDocument.Shapes(1).Name = "Wife Signature"

The trick is finding out which index number a particular shape has. I often do
this by opening the Immediate Window (Ctrl+G), typing
ActiveDocument.Shapes(1).Select then looking in the document at which picture
is selected.
 
> ActiveDocument.Shapes("picture 3").Delete
> ActiveDocument.Shapes("picture 4").Delete

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
 
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.