|
|
|
date: Mon, 6 Oct 2008 06:44:34 -0700 (PDT),
group: microsoft.public.word.vba.general
back
Re: Suppress displaying of main merge document
The code of the macro is below. The code was to a large extent
generated when I recorded the macro.
Ewout
Sub InsurancePolicy()
'
' InsurancePolicy Macro
' Macro recorded 9/9/2008 by Boter
'
Documents.Open FileName:="\\ainl1f001\inf$\data\Development
\InsurancePolicy\InsurancePolicyTemplate.doc", ConfirmConversions _
:=False, ReadOnly:=True, AddToRecentFiles:=False,
PasswordDocument:="", _
PasswordTemplate:="", Revert:=False,
WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto,
Visible:=True
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
End With
End Sub
On Oct 7, 8:15 am, "Doug Robbins - Word MVP"
wrote:
> Show us the code for your macro and we might be able to suggest how it can
> be modified.
>
> --
> Hope this helps.
>
date: Tue, 7 Oct 2008 02:37:12 -0700 (PDT)
author: unknown
Re: Suppress displaying of main merge document
Use
Sub InsurancePolicy()
'
' InsurancePolicy Macro
' Macro recorded 9/9/2008 by Boter
'
Dim maindoc as document
Set maindoc = Documents.Open
(FileName:="\\ainl1f001\inf$\data\Development\InsurancePolicy\InsurancePolicyTemplate.doc"
With maindoc.MailMerge
.Destination = wdSendToNewDocument
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
End With
maindoc.Close wdDoNotSaveChanges
End Sub
--
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
"ewout.boter@home.nl" wrote in message
news:aee9b3b1-97e9-41b0-a13c-a45fe2bc193b@h60g2000hsg.googlegroups.com...
The code of the macro is below. The code was to a large extent
generated when I recorded the macro.
Ewout
Sub InsurancePolicy()
'
' InsurancePolicy Macro
' Macro recorded 9/9/2008 by Boter
'
Documents.Open FileName:="\\ainl1f001\inf$\data\Development
\InsurancePolicy\InsurancePolicyTemplate.doc", ConfirmConversions _
:=False, ReadOnly:=True, AddToRecentFiles:=False,
PasswordDocument:="", _
PasswordTemplate:="", Revert:=False,
WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto,
Visible:=True
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
End With
End Sub
On Oct 7, 8:15 am, "Doug Robbins - Word MVP"
wrote:
> Show us the code for your macro and we might be able to suggest how it can
> be modified.
>
> --
> Hope this helps.
>
date: Tue, 7 Oct 2008 20:32:55 +1000
author: Doug Robbins - Word MVP
|
|