Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Apr 2002
    Location
    Texas, USA
    Posts
    208
    Thanks
    0
    Thanked 1 Time in 1 Post

    Mail Merge (2000/2002)

    What is the best way to use Word's Mail Merge to produce letters that will use data from an SQL DB? The user and Word will not be able to directly access the data for security reasons so the data to be used for the merge will have to come from a file. Currently my companies product use an hdr file to setup the merge and when the Word Merge needs to occurr the requested data is sent to a file that is then used by Word. I am wondering :

    A) Is this the best route to go
    [img]/forums/images/smilies/cool.gif[/img] Are there any ways to programmatically access the data in doc file used by a Mail Merge?

    Thanks
    Ed

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Mail Merge (2000/2002)

    > A) Is this the best route to go

    If you want total isolation from the database, I think you have to do it this way.

    > [img]/forums/images/smilies/cool.gif[/img] Are there any ways to programmatically access the data in doc file used by a Mail Merge?

    What do you have in mind?

    ---

    If you want to see how fancy you can get generating reports from database data, take a look at Steve Skelton's recent thread on the VB/VBA board. Perhaps have some Advil handy. <img src=/S/wink.gif border=0 alt=wink width=15 height=15>

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Mail Merge (2000/2002)

    I'm not sure why you restrict the user from using an ODBC link to SQL Server, or using an ADO programmed connection, as SQL Server security is about as robust as you can get. Certainly you can create a comma delimited or tab delimited file from SQL Server, but it requires action by the systems department each time. This sounds more like a job security issue than a Real Security Concern.

    In answer to you second question, yes it is very possible to access the data in a doc file that is being used by a Mail Merge. VBA certainly supports that kind of access, but it can also be done from other apps that support Automation as a client.
    Wendell

Posting Permissions

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