Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
[email protected] jbkd@cox.net is offline
external usenet poster
 
Posts: 1
Default Mail Merge to files with filenames from database

Hi, and thank you for this wonderful group.

Question 1: I want to create a mail merge where each letter is saved as
a separate file with the recipient as the file name. Example: the
merged letter to Joe Smith would be joesmith.doc. The name for each
file could either come from a field in the database, or it could be the
top line of the merged letter (in white so no one sees it). Is this
possible?

Question 2: If #1 is possible, is it also possible to save these files
as .htm files?

Thanks!

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Mail Merge to files with filenames from database

See the "Individual Merge Letters" item on fellow MVP Graham Mayor's website
at:

http://www.gmayor.com/individual_merge_letters.htm

If you are using Word XP or later, the "Add-in to Merge Letters to Separate
Files" that I have written and that can be downloaded from that site will
allow you to create each letter as a separate file with a filename taken
from a field in the data source with a minimum of fuss.

It should be possible to modify the code in the add-in so that the files are
saved in html format.


--
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

wrote in message
oups.com...
Hi, and thank you for this wonderful group.

Question 1: I want to create a mail merge where each letter is saved as
a separate file with the recipient as the file name. Example: the
merged letter to Joe Smith would be joesmith.doc. The name for each
file could either come from a field in the database, or it could be the
top line of the merged letter (in white so no one sees it). Is this
possible?

Question 2: If #1 is possible, is it also possible to save these files
as .htm files?

Thanks!



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Mail Merge to files with filenames from database

Or if you find Doug's add-in too difficult to edit - the Splitter macro on
that same page needs only two minor edits to achieve the same result.

Change the line:
DocName = "D:\My Documents\Temp\Workgroup\" & Format(Date, mask) _
& " " & LTrim$(Str$(Counter)) & ".doc"
to
DocName = "D:\My Documents\Temp\Workgroup\" & Format(Date, mask) _
& " " & LTrim$(Str$(Counter)) & ".htm"

and the line
ActiveDocument.SaveAs FileName:=DocName, FileFormat:=wdFormatDocument
to
ActiveDocument.SaveAs FileName:=DocName, FileFormat:=wdFormatHTML



--

Graham Mayor - Word MVP

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



Doug Robbins - Word MVP wrote:
See the "Individual Merge Letters" item on fellow MVP Graham Mayor's
website at:

http://www.gmayor.com/individual_merge_letters.htm

If you are using Word XP or later, the "Add-in to Merge Letters to
Separate Files" that I have written and that can be downloaded from
that site will allow you to create each letter as a separate file
with a filename taken from a field in the data source with a minimum
of fuss.
It should be possible to modify the code in the add-in so that the
files are saved in html format.



wrote in message
oups.com...
Hi, and thank you for this wonderful group.

Question 1: I want to create a mail merge where each letter is saved
as a separate file with the recipient as the file name. Example: the
merged letter to Joe Smith would be joesmith.doc. The name for each
file could either come from a field in the database, or it could be
the top line of the merged letter (in white so no one sees it). Is
this possible?

Question 2: If #1 is possible, is it also possible to save these
files as .htm files?

Thanks!



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
Update fields of mail merge based on lookup to database [email protected] Mailmerge 2 January 16th 06 06:01 PM
Update fields of mail merge based on lookup to database [email protected] Mailmerge 0 January 16th 06 02:25 PM
Data Files Not "Attached" to Mail Merge Main Document Denise H via OfficeKB.com Mailmerge 0 September 12th 05 08:15 PM
Mail Merge to a secured Access database Roger Mailmerge 2 May 5th 05 03:21 PM
Problem with mail merge and works database techman Mailmerge 2 December 1st 04 04:47 PM


All times are GMT +1. The time now is 07:27 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"