Results 1 to 2 of 2

Thread: Automatic Word Document/Mail Merge ??

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    10
    Hello again,

    I am using VB 5 as an interface to a database to record details of employees attending work. If they have bad attendance I would like to be able to automatically genertate a standard word document which would be sent to them using their address, which is stored in the Employee DB table.

    I have Microsoft Word as a word processing package and I was wondering how I would go about trying to accomplish this task and what sort of coding would be necessary.

    I hope someone can help.
    Thanks,
    Andy...........

  2. #2
    Hyperactive Member
    Join Date
    Feb 2000
    Posts
    284
    I'm not sure about VB5 but I have used VB6 with an Access database to accomplish the task. There is a mailmerge option on the tool bar in Access it has the Word icon, if you click on this the rest of the operation is fairly intuitive. If you are not using Access you can start Word and choose to view MailMerge toolbar and then select your datasource and insert fields wherever you want them on the document.

    At the VB end I just used an OLE object and pointed it to my document and behind it's click event I put the line
    Ole1.DoVerb this launches the document and then you simply need to click on the 'merge' option on the toolbar in Word so that it pulls back the most recent data from your database.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width