Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LOTUS WORDPRO MAIL MERGE SCRIPTING

Status
Not open for further replies.

Bodie

IS-IT--Management
Sep 29, 2000
1
I am using a script to mail merge details from a .CSV file into a wordpro document. The file is created and placed in different folders named after the user. I wrote a script to automate the process and use an environmental variable to pass in the path name. I have found that when the path changes for the first time it prompts to confirm the text delimiter (Merge Ascii File Box) and the Location of the field name (Merge Data File Field Box) then prints the letter. Subsequent Letters are ok

I am trying to avoid the prompts and

Any suggestions

this is a test script I am using to check out the problem

Sub Main

Dim mypath As String

mypath$=Inputbox("Enter Path",)

.ApplicationWindow.ActiveDocument.MergeOptions.MergeFileType = $LwpMergeTypeLetter
.ApplicationWindow.UserInterfacePrefs.LastDocPath = "C:\temp\"+mypath$
.MergeSetDataFile "C:\temp\" + mypath$ + "\Nsinvoic.csv", 2192, ""
.ApplicationWindow.ActiveDocument.MergeOptions.MergeStepNumber = $LwpMergeStepNumber2
.ApplicationWindow.ActiveDocument.MergeOptions.Options = &H40
.CheckFieldEntries True
.ApplicationWindow.ActiveDocument.MergeOptions.MergeStepNumber = $LwpMergeStepNumber3
.ApplicationWindow.ActiveDocument.MergeOptions.Options = &H1
.ApplicationWindow.ActiveDocument.MergeOptions.MergeToFile = ""
.MergeStart

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top