VB6 Word Mail Merge Sample


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: VB6 Word Mail Merge Sample

  1. #1
    Join Date
    Nov 2003
    Location
    Austin, Texas
    Posts
    59

    VB6 Word Mail Merge Sample

    Does anyone know of a good sample that shows you how to create an Excel document via a VB6 app that is then used as the DataSource for a Word MailMerge? I'm trying to find an example of this, but I can only find a sample of using another Word document as the DataSource.

    I've been digging around for a few hours and I'm not having any luck. Maybe I'm going about my search incorrectly.

    If anyone know about a good sample that details how to do this, I would really appricate it. I'm trying to convert a Word Mail Merge app that is using another Word doc as the DataSource, to using an Excel file as the datasource because the application has outgrown the max size of a Word.Table. However, I am starting to code this and I do not understand how to format the Excel document and I even if I did, I'm not sure how to go about this via VB6 code.

    Any help, suggestions, ideas, etc. will be very much appreicated.

    Thanks for you time,

    Greg Rothlander

  2. #2
    Join Date
    Nov 2004
    Posts
    293
    Greg
    Have you had any luck with this yet? If not I might be able to help you a little.

  3. #3
    Join Date
    Nov 2003
    Location
    Austin, Texas
    Posts
    59
    No luck just yet. I've been converting the Word.Table code over to use Excel but I am not sure that it will work once I hook it up to the Word Mail Merge. I have not been able to find anything in regards to how to format the Excel file so that the mail merge will know what to do with it. I'm just guessing that the first row in the Excel file should contain the mail merge field names and that each row after this should contain the data for each record.

    I would really like to see a simple example of how this works so I can tell if I am on the correct path. There is probably something really simple here that I do not know about that will really cause me problems as soon as I try to start executing the mail merge. I just haven't had any luck finding a sample of this on the Internet.

    If you have any suggestions, guidance, ideas, or if you kow of a sample, I would really appreciate the help.

    Thanks so much...

    Greg Rothlander
    PBSI

  4. #4
    Join Date
    Nov 2004
    Posts
    293
    I don't know anything about the mail merge so I could only help you with creating the Excel file, but it sounds like you have that mastered.

  5. #5
    Join Date
    Nov 2004
    Posts
    293
    Take a look at this place and see if it helps:

  6. #6
    Join Date
    Nov 2004
    Posts
    293

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center