While I agree with Doug that re-merging would be the better option - if
applicable, the following macro will do as you asked. Define the path to
your signature file at sSig =
Put (COPIES OF) the documents in a new folder and run the macro. Select that
new folder at the prompt.
Sub AddSig()
Dim strFileName As String
Dim strPath As String
Dim oDoc As Document
Dim sFind As String
Dim sSig As String
Dim fDialog As FileDialog
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
sFind = "for your successful achievement.^pManager of Project X"
sSig = "D:\My Documents\My Pictures\Signature.tif"
With fDialog
.Title = "Select Folder containing the documents to be modified and
click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show <> -1 Then
MsgBox "Cancelled By User"
Exit Sub
End If
strPath = fDialog.SelectedItems.Item(1)
If Right(strPath, 1) <> "\" Then strPath = strPath + "\"
End With
If Documents.Count > 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
strFileName = Dir$(strPath & "*.doc")
While Len(strFileName) <> 0
Set oDoc = Documents.Open(strPath & strFileName)
With Selection
With .Find
.ClearFormatting
.Text = sFind
.Replacement.Text = ""
.Wrap = wdFindContinue
.Execute
End With
.MoveRight Unit:=wdCharacter, Count:=1
.HomeKey Unit:=wdLine
.InlineShapes.AddPicture FileName:=sSig, _
LinkToFile:=False, _
SaveWithDocument:=True
.TypeParagraph
End With
oDoc.Close SaveChanges:=wdSaveChanges
Set oDoc = Nothing
GetNextDoc:
strFileName = Dir$()
Wend
End Sub
http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>