Group:  Microsoft Word ยป microsoft.public.word.mailmerge.fields
Thread: Add Signature Tiff doc to 50 Word docs in same place

Geek News

Add Signature Tiff doc to 50 Word docs in same place
Janet A. Thompson 12/13/2008 9:13:01 PM
I have 50 word documents that I want to add the same signature to.
Can this be done via Mail Merge? How?
--
Janet A.
Re: Add Signature Tiff doc to 50 Word docs in same place
"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> 12/14/2008 7:43:03 AM
This is not a job for mail merge, but if the documents are all similar in
layout, the graphic is the correct size and will be inserted in the same
place in each document, it should be possible to achieve that with a batch
process using vba. Where *exactly* do you want the graphic to be placed.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Janet A. Thompson wrote:
[Quoted Text]
> I have 50 word documents that I want to add the same signature to.
> Can this be done via Mail Merge? How?


Re: Add Signature Tiff doc to 50 Word docs in same place
Janet A. Thompson 12/14/2008 5:22:01 PM
I want it placed centered horizontally and centered vertically between two
lines. Let's say the first line is
for your successful achievement.


and the second line is
Manager of Project X

Thanks!
--
Janet A.


"Graham Mayor" wrote:

[Quoted Text]
> This is not a job for mail merge, but if the documents are all similar in
> layout, the graphic is the correct size and will be inserted in the same
> place in each document, it should be possible to achieve that with a batch
> process using vba. Where *exactly* do you want the graphic to be placed.
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
> Janet A. Thompson wrote:
> > I have 50 word documents that I want to add the same signature to.
> > Can this be done via Mail Merge? How?
>
>
>
Re: Add Signature Tiff doc to 50 Word docs in same place
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 12/14/2008 7:09:24 PM
If the 50 documents were created originally by mail merge, it would be
simpler to modify the mail merge main document by adding the signature to it
and then re-execute the merge.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Janet A. Thompson" <JanetA[ at ]discussions.microsoft.com> wrote in message
news:69300915-2FD6-4391-A766-6C645464D812[ at ]microsoft.com...
[Quoted Text]
>I want it placed centered horizontally and centered vertically between two
> lines. Let's say the first line is
> for your successful achievement.
>
>
> and the second line is
> Manager of Project X
>
> Thanks!
> --
> Janet A.
>
>
> "Graham Mayor" wrote:
>
>> This is not a job for mail merge, but if the documents are all similar in
>> layout, the graphic is the correct size and will be inserted in the same
>> place in each document, it should be possible to achieve that with a
>> batch
>> process using vba. Where *exactly* do you want the graphic to be placed.
>>
>> --
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> Graham Mayor - Word MVP
>>
>> My web site www.gmayor.com
>> Word MVP web site http://word.mvps.org
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>
>>
>> Janet A. Thompson wrote:
>> > I have 50 word documents that I want to add the same signature to.
>> > Can this be done via Mail Merge? How?
>>
>>
>>


Re: Add Signature Tiff doc to 50 Word docs in same place
"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> 12/15/2008 2:00:05 PM
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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Janet A. Thompson wrote:
[Quoted Text]
> I want it placed centered horizontally and centered vertically
> between two lines. Let's say the first line is
> for your successful achievement.
>
>
> and the second line is
> Manager of Project X
>
> Thanks!
>
>> This is not a job for mail merge, but if the documents are all
>> similar in layout, the graphic is the correct size and will be
>> inserted in the same place in each document, it should be possible
>> to achieve that with a batch process using vba. Where *exactly* do
>> you want the graphic to be placed.
>>
>> --
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> Graham Mayor - Word MVP
>>
>> My web site www.gmayor.com
>> Word MVP web site http://word.mvps.org
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>
>>
>> Janet A. Thompson wrote:
>>> I have 50 word documents that I want to add the same signature to.
>>> Can this be done via Mail Merge? How?


Re: Add Signature Tiff doc to 50 Word docs in same place
Janet A. Thompson 12/17/2008 6:11:01 PM
Oh WOW!! I can't wait to test it out. Something like this was what I was
hoping for. Thanks!
--
Janet A.


"Graham Mayor" wrote:

[Quoted Text]
> 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
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
> Janet A. Thompson wrote:
> > I want it placed centered horizontally and centered vertically
> > between two lines. Let's say the first line is
> > for your successful achievement.
> >
> >
> > and the second line is
> > Manager of Project X
> >
> > Thanks!
> >
> >> This is not a job for mail merge, but if the documents are all
> >> similar in layout, the graphic is the correct size and will be
> >> inserted in the same place in each document, it should be possible
> >> to achieve that with a batch process using vba. Where *exactly* do
> >> you want the graphic to be placed.
> >>
> >> --
> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >> Graham Mayor - Word MVP
> >>
> >> My web site www.gmayor.com
> >> Word MVP web site http://word.mvps.org
> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>
> >>
> >> Janet A. Thompson wrote:
> >>> I have 50 word documents that I want to add the same signature to.
> >>> Can this be done via Mail Merge? How?
>
>
>
Re: Add Signature Tiff doc to 50 Word docs in same place
Janet A. Thompson 12/18/2008 3:05:01 AM
Graham,
I am sorry to admit it but I read all thru your website link at the
bottom of your most kind post, and I don't know in which document to save the
macro or if it even would be saved into a document?
I am a beginner VBAer. On another note, where or what is a good course
to go to learn VBA? So I have two questions: where to plug the macro is the
other.
Thanks!!
--
Janet A.


"Janet A. Thompson" wrote:

[Quoted Text]
> Oh WOW!! I can't wait to test it out. Something like this was what I was
> hoping for. Thanks!
> --
> Janet A.
>
>
> "Graham Mayor" wrote:
>
> > 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
> >
> > My web site www.gmayor.com
> > Word MVP web site http://word.mvps.org
> > <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >
> >
> > Janet A. Thompson wrote:
> > > I want it placed centered horizontally and centered vertically
> > > between two lines. Let's say the first line is
> > > for your successful achievement.
> > >
> > >
> > > and the second line is
> > > Manager of Project X
> > >
> > > Thanks!
> > >
> > >> This is not a job for mail merge, but if the documents are all
> > >> similar in layout, the graphic is the correct size and will be
> > >> inserted in the same place in each document, it should be possible
> > >> to achieve that with a batch process using vba. Where *exactly* do
> > >> you want the graphic to be placed.
> > >>
> > >> --
> > >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> > >> Graham Mayor - Word MVP
> > >>
> > >> My web site www.gmayor.com
> > >> Word MVP web site http://word.mvps.org
> > >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> > >>
> > >>
> > >> Janet A. Thompson wrote:
> > >>> I have 50 word documents that I want to add the same signature to.
> > >>> Can this be done via Mail Merge? How?
> >
> >
> >
Re: Add Signature Tiff doc to 50 Word docs in same place
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 12/18/2008 4:15:50 AM
Did you look at the http://www.gmayor.com/installing_macro.htm link at the
bottom of Graham;s message?

To learn more about VBA take a look at the article "Getting To Grips With
VBA Basics In 15 Minutes" at:

http://www.word.mvps.org/FAQs/MacrosVBA/VBABasicsIn15Mins.htm

and at other things on pages on that site and at the pages that are linked
from that site.


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Janet A. Thompson" <JanetA[ at ]discussions.microsoft.com> wrote in message
news:B2B2C5D0-9365-4137-9E80-9797DF33D2F8[ at ]microsoft.com...
[Quoted Text]
> Graham,
> I am sorry to admit it but I read all thru your website link at the
> bottom of your most kind post, and I don't know in which document to save
> the
> macro or if it even would be saved into a document?
> I am a beginner VBAer. On another note, where or what is a good course
> to go to learn VBA? So I have two questions: where to plug the macro is
> the
> other.
> Thanks!!
> --
> Janet A.
>
>
> "Janet A. Thompson" wrote:
>
>> Oh WOW!! I can't wait to test it out. Something like this was what I
>> was
>> hoping for. Thanks!
>> --
>> Janet A.
>>
>>
>> "Graham Mayor" wrote:
>>
>> > 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
>> >
>> > My web site www.gmayor.com
>> > Word MVP web site http://word.mvps.org
>> > <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> >
>> >
>> > Janet A. Thompson wrote:
>> > > I want it placed centered horizontally and centered vertically
>> > > between two lines. Let's say the first line is
>> > > for your successful achievement.
>> > >
>> > >
>> > > and the second line is
>> > > Manager of Project X
>> > >
>> > > Thanks!
>> > >
>> > >> This is not a job for mail merge, but if the documents are all
>> > >> similar in layout, the graphic is the correct size and will be
>> > >> inserted in the same place in each document, it should be possible
>> > >> to achieve that with a batch process using vba. Where *exactly* do
>> > >> you want the graphic to be placed.
>> > >>
>> > >> --
>> > >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> > >> Graham Mayor - Word MVP
>> > >>
>> > >> My web site www.gmayor.com
>> > >> Word MVP web site http://word.mvps.org
>> > >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> > >>
>> > >>
>> > >> Janet A. Thompson wrote:
>> > >>> I have 50 word documents that I want to add the same signature to.
>> > >>> Can this be done via Mail Merge? How?
>> >
>> >
>> >


Re: Add Signature Tiff doc to 50 Word docs in same place
"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> 12/18/2008 6:52:46 AM
Save the macro in the normal template -
http://www.gmayor.com/installing_macro.htm
Note that the search string
"for your successful achievement.^pManager of Project X"
is a literal string. It must be the *exact* string in your documents (^p is
a paragraph ending) in order for the macro to find it.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>



Janet A. Thompson wrote:
[Quoted Text]
> Graham,
> I am sorry to admit it but I read all thru your website link at the
> bottom of your most kind post, and I don't know in which document to
> save the macro or if it even would be saved into a document?
> I am a beginner VBAer. On another note, where or what is a good
> course to go to learn VBA? So I have two questions: where to plug
> the macro is the other.
> Thanks!!
>
>> Oh WOW!! I can't wait to test it out. Something like this was
>> what I was hoping for. Thanks!
>> --
>> Janet A.
>>
>>
>> "Graham Mayor" wrote:
>>
>>> 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
>>>
>>> My web site www.gmayor.com
>>> Word MVP web site http://word.mvps.org
>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>
>>>
>>> Janet A. Thompson wrote:
>>>> I want it placed centered horizontally and centered vertically
>>>> between two lines. Let's say the first line is
>>>> for your successful achievement.
>>>>
>>>>
>>>> and the second line is
>>>> Manager of Project X
>>>>
>>>> Thanks!
>>>>
>>>>> This is not a job for mail merge, but if the documents are all
>>>>> similar in layout, the graphic is the correct size and will be
>>>>> inserted in the same place in each document, it should be possible
>>>>> to achieve that with a batch process using vba. Where *exactly* do
>>>>> you want the graphic to be placed.
>>>>>
>>>>> --
>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>> Graham Mayor - Word MVP
>>>>>
>>>>> My web site www.gmayor.com
>>>>> Word MVP web site http://word.mvps.org
>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>>
>>>>>
>>>>> Janet A. Thompson wrote:
>>>>>> I have 50 word documents that I want to add the same signature
>>>>>> to. Can this be done via Mail Merge? How?


Re: Add Signature Tiff doc to 50 Word docs in same place
Janet A. Thompson 12/20/2008 4:16:00 AM
Ahhhh, save the macro in the normal template. Thanks so much.
--
Janet A.


"Graham Mayor" wrote:

[Quoted Text]
> Save the macro in the normal template -
> http://www.gmayor.com/installing_macro.htm
> Note that the search string
> "for your successful achievement.^pManager of Project X"
> is a literal string. It must be the *exact* string in your documents (^p is
> a paragraph ending) in order for the macro to find it.
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
>
> Janet A. Thompson wrote:
> > Graham,
> > I am sorry to admit it but I read all thru your website link at the
> > bottom of your most kind post, and I don't know in which document to
> > save the macro or if it even would be saved into a document?
> > I am a beginner VBAer. On another note, where or what is a good
> > course to go to learn VBA? So I have two questions: where to plug
> > the macro is the other.
> > Thanks!!
> >
> >> Oh WOW!! I can't wait to test it out. Something like this was
> >> what I was hoping for. Thanks!
> >> --
> >> Janet A.
> >>
> >>
> >> "Graham Mayor" wrote:
> >>
> >>> 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
> >>>
> >>> My web site www.gmayor.com
> >>> Word MVP web site http://word.mvps.org
> >>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>
> >>>
> >>> Janet A. Thompson wrote:
> >>>> I want it placed centered horizontally and centered vertically
> >>>> between two lines. Let's say the first line is
> >>>> for your successful achievement.
> >>>>
> >>>>
> >>>> and the second line is
> >>>> Manager of Project X
> >>>>
> >>>> Thanks!
> >>>>
> >>>>> This is not a job for mail merge, but if the documents are all
> >>>>> similar in layout, the graphic is the correct size and will be
> >>>>> inserted in the same place in each document, it should be possible
> >>>>> to achieve that with a batch process using vba. Where *exactly* do
> >>>>> you want the graphic to be placed.
> >>>>>
> >>>>> --
> >>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>>> Graham Mayor - Word MVP
> >>>>>
> >>>>> My web site www.gmayor.com
> >>>>> Word MVP web site http://word.mvps.org
> >>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>>>
> >>>>>
> >>>>> Janet A. Thompson wrote:
> >>>>>> I have 50 word documents that I want to add the same signature
> >>>>>> to. Can this be done via Mail Merge? How?
>
>
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net