Macro will not stay

C

clayung

I helped a user to add macros In Word 2007 for adding signature of her
bosses. The macros was added to the normal.dotm with buttons created on the
Quick Access Toolbar. I have no problem creating the first macro, but the
2nd and 3rd macros could not stay. They were successfully created (with
different names) and tested, they appeared also in the Macro list in the
Developer Tab. But once I closed the document and open another blank
document, the 2nd and 3rd macroes were no long working. They were gone from
the Macro List. I repeated the process for at least five time with the same
result. Can't anyone explain to me why the 2nd and 3rd macros are gone?
Thanks a lot.
 
G

Graham Mayor

Hard to say what you have done, but my guess is that you didn't save them in
the normal template, but in the document.
http://www.gmayor.com/installing_macro.htm

You could have used just one macro - something along the lines of

Sub InsertSig()
Dim sFname As String
Dim sPick As String
Start:
sPick = InputBox("Enter the number of the required signature" & vbCr & vbCr
& _
"1 - Fred" & vbCr & "2 - Bill" & vbCr & "3 - John", "Signatures", 1)
Select Case sPick
Case Is = "1"
sFname = "D:\My Documents\My Pictures\Fred Signature.tif"
Case Is = "2"
sFname = "D:\My Documents\My Pictures\Bill Signature.tif"
Case Is = "3"
sFname = "D:\My Documents\My Pictures\John Signature.tif"
Case Is = ""
Exit Sub
Case Else
MsgBox "Enter 1, 2 or 3!", vbCritical, "Error"
GoTo Start
End Select
Selection.InlineShapes.AddPicture FileName:= _
sFname, LinkToFile:=False, _
SaveWithDocument:=True
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top