#1   Report Post  
Posted to microsoft.public.word.docmanagement
jlawson jlawson is offline
external usenet poster
 
Posts: 25
Default Image Macro Password

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.

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
password protect a digital signature or macro wendyatnetdata Microsoft Word Help 0 July 12th 06 08:49 PM
custom password macro yongkalep Microsoft Word Help 1 April 19th 06 03:10 PM
Macro Button Won't Stay on Toolbar caleb Microsoft Word Help 2 June 14th 05 11:59 PM
Protected Fields in an Online Form hnyb1 Microsoft Word Help 5 January 19th 05 02:52 PM
2000 to 2002 macro and "Could not open macro storage" Art Farrell Mailmerge 1 December 6th 04 12:40 PM


All times are GMT +1. The time now is 09:03 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"