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 / August 2007

Tip: Looking for answers? Try searching our database.

Inlineshapes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
paradigm - 02 Aug 2007 10:29 GMT
I am using an inlineshape as a signature on letters. The user can
automatically insert a scanned signature. (controlled by Access 2003)
The problem I have is removing the signature if someone else want to sign
the document. I have a routine which removes all inlineshapes from a
document but there is a danger that a user may insert their own inlineshapes
and these would also be deleted.
How can I identify a particular shape and then delete it?
Alex
Jonathan West - 02 Aug 2007 10:31 GMT
>I am using an inlineshape as a signature on letters. The user can
>automatically insert a scanned signature. (controlled by Access 2003)
[quoted text clipped - 4 lines]
> How can I identify a particular shape and then delete it?
> Alex

If you use VBA to insert an inline shape, you can set the Name of the shape
to something distinctive. Or you can set the AlternativeText property to
"Signature" or something similar. Then when you are deleting inline shapes,
you can delete only those which you have tagged in this way.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

paradigm - 02 Aug 2007 10:58 GMT
Have  you any smaple code that shows how I could assign a name to it and
then select it again for deletion. Thanks.
Alex

>>I am using an inlineshape as a signature on letters. The user can
>>automatically insert a scanned signature. (controlled by Access 2003)
[quoted text clipped - 10 lines]
> inline shapes, you can delete only those which you have tagged in this
> way.
Helmut Weber - 02 Aug 2007 12:46 GMT
Hi Alec,

like this:

Sub Macro7a()
Dim oInl As InlineShape

Set oInl = Selection.InlineShapes.AddPicture _
("C:\test\bild\smallfail.gif")
oInl.AlternativeText = "Failure"
Set oInl = Selection.InlineShapes.AddPicture _
("C:\test\bild\smallsuccess.gif")
oInl.AlternativeText = "Success"
Set oInl = Selection.InlineShapes.AddPicture _
("C:\test\bild\exclam.gif")
oInl.AlternativeText = "Exclamation"
For Each oInl In ActiveDocument.InlineShapes
  If oInl.AlternativeText = "Failure" Then
     oInl.Delete
  End If
Next
End Sub

Astonishingly enough, not all objects
have a name property. Shapes have,
inlineshapes don't.

I'm still learning.

Signature

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"

paradigm - 02 Aug 2007 15:28 GMT
Many thanks.
Alex

> Hi Alec,
>
[quoted text clipped - 24 lines]
>
> I'm still learning.
 
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.