Re: How to use access query computed fields in Word mailmerge



Whoops! I'm glad you found that as it was the one thing that I left out that
really needed to be there. Time for a break, I think :-)

I have no idea why MS didn't document the SubType argument - for future
reference it's always worth
a. having a look at their knowledgebase at http://support.microsoft.com
b. searching Google Groups

Peter Jamieson
"Rey" <Rey@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0C887ECB-6899-4E26-AFA5-7A4714DDFDC7@xxxxxxxxxxxxxxxx
> Peter:
> Thanks for your helpful advice. While I was waiting for your reply I
> found an even better solution (Because I do port from home to church and
> back
> since I do the development at home). It is to use
> SubType:=wdMergeSubTypeWord2000 at the end of the OpenDataSource call. I
> found this answer at Cindy Meister's excellent website:
> http://homepage.swissonline.ch/cindymeister/MM2002/MM2002.htm
>
> Of course, if Microsoft had documented the SubType argument to
> OpenDataSource it would have saved me uncountable work and grief. But I
> guess
> that is expecting too much. :-(
> Thanks again for all your help.
> Rey
>
> "Peter Jamieson" wrote:
>
>> Once you have gone through the connection process once, Word should
>> remember
>> the connection and your users should not have to make it (unless you are
>> distributing the application for use on systems where the files will be
>> in
>> different folders etc., and it doesn't sound as if you are). The users
>> may
>> encounter one or more security-related messages (at least one from Word
>> about SQL, and one from Access) but they should not have to pick a table
>> or
>> query name.
>>
>> To make a DDE connection in code from Word 2000/2002 I think you will
>> need
>> to do at least the following:
>>
>> ActiveDocument.MailMerge.OpenDataSource _
>> Name:="the full pathname of your access .mdb", _
>> Connection:="QUERY the query name", _ ' or "TABLE the table name"
>> SQLStatement:="SELECT * FROM [the table or query name]"
>>
>> Peter Jamieson
>> >
>>
>>


.



Relevant Pages

  • Re: How to use access query computed fields in Word mailmerge
    ... OpenDataSource it would have saved me uncountable work and grief. ... "Peter Jamieson" wrote: ... > Once you have gone through the connection process once, ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Data Source Lost When Merge From Access to Word
    ... "Peter Jamieson" wrote: ... The database and the files are ... re-establish the connection. ... corresponding data or the connection was lost. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Automated Mail Merge Displaying unwanted Dialog Boxes
    ... "Peter Jamieson" wrote: ... recognise the field delimiters. ... no way to specify the delimiter in the OpenDataSource call or, ... Dim wrdApp As Word.Application ...
    (microsoft.public.word.mailmerge.fields)
  • Re: "Word was unable to open the Excel data source" Asp.net Mailme
    ... > Asp.Net account is having access rights of using Excel and Word. ... > re-establish a DDE connection to Microsoft Excel to complete the current ... If you do not need to use ODBC, ... >> Peter Jamieson ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Hide dialogs on mailmerge
    ... No, what I was saying is that for most types of connection, if the ... the user shouldn't see prompts for either "Select Data Source", ... I would say the main point is that once you call OpenDataSource, ...
    (microsoft.public.word.mailmerge.fields)