Reply
 
Thread Tools Display Modes
  #1   Report Post  
name
 
Posts: n/a
Default Mail Merge Fill-In Field

Hi

I need some help with some prompts that i have inserted into a mailmerge
template.

I export data out from a database to a txt document in comma deliminated
form for columns and linefeed as record values.

I then use the following code to merge the document:

ActiveDocument.MailMerge.OpenDataSource Name:="C:\Temp\Export.txt", _
ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True, _
AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", _
WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False, _
Format:=wdOpenFormatAuto, Connection:="", SQLStatement:="",
SQLStatement1 _
:=""

Dim srcDoc As Word.Document
Set srcDoc = ActiveDocument

With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
.DataSource.Close
End With

srcDoc.Close (False)

This works really. But the user requires a few extra fields at run time and
so I use Fill-In fields. The code launches the template document; which
spawns a new document; which is the actual finished merged document; this
means the request for the fill-in fields appears twice because two documents
actually load up. I have tried to supress the first call of fill-in fields
from the template and just keep the calls from the merged document it self. I
have been unsuccesful.

Can any one help?

Thanks
name
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
Mail Merge Field window should remain open to insert multiple fiel Steinway60 Mailmerge 1 July 20th 05 04:08 PM
Mail merge field different in datasource & insert a field menu Silvs Mailmerge 1 April 22nd 05 06:18 AM
mail merge with attachments AS Mailmerge 5 April 9th 05 09:49 AM
Switch an image dynamically based on mail merge field - possible? Chris Hlusak Mailmerge 1 January 24th 05 11:11 PM
How do I get a field to self adjust in a mail merge? DD Holt Mailmerge 1 December 29th 04 06:30 PM


All times are GMT +1. The time now is 07:16 AM.

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"