🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: ab.software.developers
Article #647

Mail Merge with Word97 and Vfp5

#647
From: Gene
Date: Fri, 24 Sep 1999 00:00
26 lines
1302 bytes
Don't know how to reply to messages so i'm putting this here

Mail Merge with Word97 and Vfp5
Create the mail merge document in word called _Templat.doc
add your data base to the merge

In Vfp5 run the following code
oWord = CREATEOBJECT("Word.Application")  && Get Word97
oWord.Visible = .T.                       && Make it visible

oWord.Top    = 0                          && Set sizing
oWord.Left   = 0
oWord.Height = 450
oWord.Width  = 600

*** oWord.Documents.Add                   && Add a new Document

*** Mail Merge Part
oWord.Documents.Open("_templat.DOC")      && Get the document
oWord.ActiveDocument.SaveAs("TEST1.DOC")  && Save as new name
*** Set up Merge to printer
oWord.ActiveDocument.MailMerge.Destination = 1  && 1 = to print
oWord.ActiveDocument.MailMerge.Execute    && Run printer


Enjoy;
Technical Details
Message-ID: <7sgb39$r1u$1@news.monmouth.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10f2ee,85022f490e6758e9,start
X-Google-Attributes: gid10f2ee,public
From: "Gene" <seendg@monmouth.com>
Subject: Mail Merge with Word97 and Vfp5
Date: 1999/09/24
Message-ID: <7sgb39$r1u$1@news.monmouth.com>
X-Deja-AN: 529120913
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Organization: Monmouth Internet
X-MSMail-Priority: Normal
Newsgroups: ab.software.developers