Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
I'm trying to get an image to appear after a bookmark in Word when
the user puts in their password. The scenario is the supervisor clicks on a check box in the document; it runs a macro on entry, brings up a UserForm where the supervisor will fill out information and put in their password. After their password is in and they click OK macros will run a IF THEN statement against the password and if it is correct put their name and image (signature) into the document. I've gotten everything working except the image part. VBA help suggests using a macro to insert a drawing canvas and then insert the image into it. Is there an easier way to insert the image or is the drawing canvas idea the way to go. I couldn't figure out an easy way to judge where the canvas will go to. Word uses numbers from left to top to position the canvas. Let me show you what I have so far... Dim shpCanvas As Shape Set shpCanvas = ActiveDocument.Shapes.AddCanvas(Left:=100, Top:=75, Width:=200, _ Height:=300) If UserForm4.txtPassword.Text = "dude" Then ActiveDocument.FormFields("ApBy").Result = "Josh" End If If UserForm4.txtPassword.Text = "itguy" Then ActiveDocument.FormFields("ApBy").Result = "Mike" shpCanvas.CanvasItems.AddPicture _ FileName:="C:\Program Files\Microsoft Office\" & _ "Office\Bitmaps\Styles\stone.bmp", _ LinkToFile:=False, SaveWithDocument:=True Else ActiveDocument.FormFields("ApBy").Result = "Invalid Password" End If This is just the image part of the Macro. I'm using Word XP. This group has been so helpful in the past, thank you so much. |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
password protect a digital signature or macro | Microsoft Word Help | |||
custom password macro | Microsoft Word Help | |||
Macro Button Won't Stay on Toolbar | Microsoft Word Help | |||
Protected Fields in an Online Form | Microsoft Word Help | |||
2000 to 2002 macro and "Could not open macro storage" | Mailmerge |