Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Sailor Sailor is offline
external usenet poster
 
Posts: 2
Default Mail merge with Access query as source

I am trying to create a Word mail merge with an Access database query that
has a parameter (asks for a unique date).
When Word asks for "Select Recipients" I go to my database and the dialog
box lists the database along with all of my Queries EXCEPT QUERIES THAT HAVE
A PARAMETER so I cannot select the parameter query that contains the list of
recipients that I want send to .
How do I get the parameter query to be listed so I can select it to be the
target of my Mail Merge?
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Mail merge with Access query as source

The only easy way to do it is to change the way that Word connects to
the data source to DDE

in Word 2007, check Office button-Word options-Advanced-Confirm file
format conversion on open (near the bottom), go through the connection
process again, and you should see an additional Confirm Data Source
dialog box. If you see an entry like "MS Access databases via DDE",
select it. If you only see "OLE DB database files" (typically if you are
using a .accdb rather than a .mdb source), check Show all, then locate
and select that DDE option, and continue. In Word 2003, the option has a
similar name under Tools-Options-General.

Peter Jamieson

http://tips.pjmsn.me.uk

On 21/02/2010 15:52, sailor wrote:
I am trying to create a Word mail merge with an Access database query that
has a parameter (asks for a unique date).
When Word asks for "Select Recipients" I go to my database and the dialog
box lists the database along with all of my Queries EXCEPT QUERIES THAT HAVE
A PARAMETER so I cannot select the parameter query that contains the list of
recipients that I want send to .
How do I get the parameter query to be listed so I can select it to be the
target of my Mail Merge?

  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
MikeV MikeV is offline
external usenet poster
 
Posts: 3
Default Mail merge with Access query as source



"Peter Jamieson" wrote:

The only easy way to do it is to change the way that Word connects to
the data source to DDE

in Word 2007, check Office button-Word options-Advanced-Confirm file
format conversion on open (near the bottom), go through the connection
process again, and you should see an additional Confirm Data Source
dialog box. If you see an entry like "MS Access databases via DDE",
select it. If you only see "OLE DB database files" (typically if you are
using a .accdb rather than a .mdb source), check Show all, then locate
and select that DDE option, and continue. In Word 2003, the option has a
similar name under Tools-Options-General.

Peter Jamieson

http://tips.pjmsn.me.uk

On 21/02/2010 15:52, sailor wrote:
I am trying to create a Word mail merge with an Access database query that
has a parameter (asks for a unique date).
When Word asks for "Select Recipients" I go to my database and the dialog
box lists the database along with all of my Queries EXCEPT QUERIES THAT HAVE
A PARAMETER so I cannot select the parameter query that contains the list of
recipients that I want send to .
How do I get the parameter query to be listed so I can select it to be the
target of my Mail Merge?

.

  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
MikeV MikeV is offline
external usenet poster
 
Posts: 3
Default Mail merge with Access query as source

By using DDE for a .mdb database, is this implying that Word 2007 cannot
communicate with an Access 2007 database via DDE?

When I try this with an Access 2007 database, it still does not work. The
query pulls
a value off a form to satisfy a criteria entry. When I run it, it prompts
for the value instead of pulling it off the form. This worked when both the
Word document and the database were 2003, but in 2007, they don't work. Do I
need to leave my Access database 2003?

"Peter Jamieson" wrote:

The only easy way to do it is to change the way that Word connects to
the data source to DDE

in Word 2007, check Office button-Word options-Advanced-Confirm file
format conversion on open (near the bottom), go through the connection
process again, and you should see an additional Confirm Data Source
dialog box. If you see an entry like "MS Access databases via DDE",
select it. If you only see "OLE DB database files" (typically if you are
using a .accdb rather than a .mdb source), check Show all, then locate
and select that DDE option, and continue. In Word 2003, the option has a
similar name under Tools-Options-General.

Peter Jamieson

http://tips.pjmsn.me.uk

On 21/02/2010 15:52, sailor wrote:
I am trying to create a Word mail merge with an Access database query that
has a parameter (asks for a unique date).
When Word asks for "Select Recipients" I go to my database and the dialog
box lists the database along with all of my Queries EXCEPT QUERIES THAT HAVE
A PARAMETER so I cannot select the parameter query that contains the list of
recipients that I want send to .
How do I get the parameter query to be listed so I can select it to be the
target of my Mail Merge?

.

  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Mail merge with Access query as source

FWIW I never use Access forms data as a data source so I cannot tell you
much more about Word2007+Access2007 accdb+DDE than I can find out with
some simple experiments.

First, an example of something that does work here is where you have a
simple query in Access like
SELECT [Forms]![Products].[ProductName]

Let's say this query is called XXX.

As long as my database is open and the Products form is open, I can
connect using the user interface
a. from Word 2003 to mydb.mdb
b. from Word 2007 to mydb.mdb
c. from Word 2007 to mydb.accdb
and select the query XXX and everything is OK. It helps if the
..mdb/.accdb is in a trusted location in Access 2007.

However,
1. if I try to connect programmatically to the same query, (c) is a
problem because Word mangles the database pathname if I tell it to open
a .accdb but specify a COnnection paramter such as "QUERY XXX". I can
only get Word 2007 to connect programmtically using DDE if I rename the
database so that it has extension .mdb (e.g. mydbaccdb.mdb).
Unfortunately I cannot tell you what other consequences using the
extension ".mdb" foa ".accdb" might have.
2. Just because I can do it, does not mean that other things (such as
network-related problems) might not get in the way.

I haven't personally had much luck using query syntax such as

SELECT [Forms]![Products].[ProductName]

in a query I issue from Word VBA (in any version), but if you are doing
that successfully in Word 2003, let me know what syntrax you are using
and I can at least try a simple equivalent here.


Peter Jamieson

http://tips.pjmsn.me.uk

On 10/05/2010 14:53, MikeV wrote:
By using DDE for a .mdb database, is this implying that Word 2007 cannot
communicate with an Access 2007 database via DDE?

When I try this with an Access 2007 database, it still does not work. The
query pulls
a value off a form to satisfy a criteria entry. When I run it, it prompts
for the value instead of pulling it off the form. This worked when both the
Word document and the database were 2003, but in 2007, they don't work. Do I
need to leave my Access database 2003?

"Peter Jamieson" wrote:

The only easy way to do it is to change the way that Word connects to
the data source to DDE

in Word 2007, check Office button-Word options-Advanced-Confirm file
format conversion on open (near the bottom), go through the connection
process again, and you should see an additional Confirm Data Source
dialog box. If you see an entry like "MS Access databases via DDE",
select it. If you only see "OLE DB database files" (typically if you are
using a .accdb rather than a .mdb source), check Show all, then locate
and select that DDE option, and continue. In Word 2003, the option has a
similar name under Tools-Options-General.

Peter Jamieson

http://tips.pjmsn.me.uk

On 21/02/2010 15:52, sailor wrote:
I am trying to create a Word mail merge with an Access database query that
has a parameter (asks for a unique date).
When Word asks for "Select Recipients" I go to my database and the dialog
box lists the database along with all of my Queries EXCEPT QUERIES THAT HAVE
A PARAMETER so I cannot select the parameter query that contains the list of
recipients that I want send to .
How do I get the parameter query to be listed so I can select it to be the
target of my Mail Merge?

.



  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Mail merge with Access query as source

See the links in the following message posted by fellow MVP (and Bill Gates
look alike) Alber Kallal:

Quote

Actually, use my merge sample. it don't give that warning, and you don't
have to change registiry stuff etc.

The sample I have can be found he
http://www.members.shaw.ca/AlbertKal.../msaccess.html

What is nice/interesting about my sample is that is specially designed to
enable ANY form with ONE LINE of code....

Thus, each time you build a new form, you can word merge enable it with
great ease.

Make sure you read the instructions from above, and you should eventually
get to the follwoing page
http://www.members.shaw.ca/AlbertKal...rge/page2.html


Note that the merge can also use a query, and thus you don't have to merge
just "one" record..

After the merge occurs, you get a plain document WITHOUT any merge fields,
and this allows the end user to save, edit, or even email the document
(since the merge fields are gone after the merge occurs).

Give the above a try€¦


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada


Unquote

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"MikeV" wrote in message
...
By using DDE for a .mdb database, is this implying that Word 2007 cannot
communicate with an Access 2007 database via DDE?

When I try this with an Access 2007 database, it still does not work. The
query pulls
a value off a form to satisfy a criteria entry. When I run it, it prompts
for the value instead of pulling it off the form. This worked when both
the
Word document and the database were 2003, but in 2007, they don't work.
Do I
need to leave my Access database 2003?

"Peter Jamieson" wrote:

The only easy way to do it is to change the way that Word connects to
the data source to DDE

in Word 2007, check Office button-Word options-Advanced-Confirm file
format conversion on open (near the bottom), go through the connection
process again, and you should see an additional Confirm Data Source
dialog box. If you see an entry like "MS Access databases via DDE",
select it. If you only see "OLE DB database files" (typically if you are
using a .accdb rather than a .mdb source), check Show all, then locate
and select that DDE option, and continue. In Word 2003, the option has a
similar name under Tools-Options-General.

Peter Jamieson

http://tips.pjmsn.me.uk

On 21/02/2010 15:52, sailor wrote:
I am trying to create a Word mail merge with an Access database query
that
has a parameter (asks for a unique date).
When Word asks for "Select Recipients" I go to my database and the
dialog
box lists the database along with all of my Queries EXCEPT QUERIES THAT
HAVE
A PARAMETER so I cannot select the parameter query that contains the
list of
recipients that I want send to .
How do I get the parameter query to be listed so I can select it to be
the
target of my Mail Merge?

.

  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
MikeV MikeV is offline
external usenet poster
 
Posts: 3
Default Mail merge with Access query as source

Today things work. The original 2003 Access database is using a Workgroup
security file. I think that was getting in the way. Things finally got to
the point where Access was prompting me for a username and password for any
database and no usename/password combination would work. I was locked out of
all my databases.

I deleted the System.mdw file and everything finally cleared up. I created
a new 2007 blank database and imported everything from the 2003 database. I
was then able to link the Word documents using the "DDE for .mdb files"
option and everything worked after that. Thanks for the replies guys.



"Doug Robbins - Word MVP" wrote:

See the links in the following message posted by fellow MVP (and Bill Gates
look alike) Alber Kallal:

Quote

Actually, use my merge sample. it don't give that warning, and you don't
have to change registiry stuff etc.

The sample I have can be found he
http://www.members.shaw.ca/AlbertKal.../msaccess.html

What is nice/interesting about my sample is that is specially designed to
enable ANY form with ONE LINE of code....

Thus, each time you build a new form, you can word merge enable it with
great ease.

Make sure you read the instructions from above, and you should eventually
get to the follwoing page
http://www.members.shaw.ca/AlbertKal...rge/page2.html


Note that the merge can also use a query, and thus you don't have to merge
just "one" record..

After the merge occurs, you get a plain document WITHOUT any merge fields,
and this allows the end user to save, edit, or even email the document
(since the merge fields are gone after the merge occurs).

Give the above a try€¦


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada


Unquote

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"MikeV" wrote in message
...
By using DDE for a .mdb database, is this implying that Word 2007 cannot
communicate with an Access 2007 database via DDE?

When I try this with an Access 2007 database, it still does not work. The
query pulls
a value off a form to satisfy a criteria entry. When I run it, it prompts
for the value instead of pulling it off the form. This worked when both
the
Word document and the database were 2003, but in 2007, they don't work.
Do I
need to leave my Access database 2003?

"Peter Jamieson" wrote:

The only easy way to do it is to change the way that Word connects to
the data source to DDE

in Word 2007, check Office button-Word options-Advanced-Confirm file
format conversion on open (near the bottom), go through the connection
process again, and you should see an additional Confirm Data Source
dialog box. If you see an entry like "MS Access databases via DDE",
select it. If you only see "OLE DB database files" (typically if you are
using a .accdb rather than a .mdb source), check Show all, then locate
and select that DDE option, and continue. In Word 2003, the option has a
similar name under Tools-Options-General.

Peter Jamieson

http://tips.pjmsn.me.uk

On 21/02/2010 15:52, sailor wrote:
I am trying to create a Word mail merge with an Access database query
that
has a parameter (asks for a unique date).
When Word asks for "Select Recipients" I go to my database and the
dialog
box lists the database along with all of my Queries EXCEPT QUERIES THAT
HAVE
A PARAMETER so I cannot select the parameter query that contains the
list of
recipients that I want send to .
How do I get the parameter query to be listed so I can select it to be
the
target of my Mail Merge?
.

  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Mail merge with Access query as source

Just in case you haven't discovered it yet, AIUI .accdb doesn't support
the whole workgroup security file approach. AFAIK MS expects you to move
to the security features provided by (say) a SQL Server backend if you
need an equivalent. But I'm not an Access expert and perhaps that's an
oversimplification.

Peter Jamieson

http://tips.pjmsn.me.uk

On 11/05/2010 21:13, MikeV wrote:
Today things work. The original 2003 Access database is using a Workgroup
security file. I think that was getting in the way. Things finally got to
the point where Access was prompting me for a username and password for any
database and no usename/password combination would work. I was locked out of
all my databases.

I deleted the System.mdw file and everything finally cleared up. I created
a new 2007 blank database and imported everything from the 2003 database. I
was then able to link the Word documents using the "DDE for .mdb files"
option and everything worked after that. Thanks for the replies guys.



"Doug Robbins - Word MVP" wrote:

See the links in the following message posted by fellow MVP (and Bill Gates
look alike) Alber Kallal:

Quote

Actually, use my merge sample. it don't give that warning, and you don't
have to change registiry stuff etc.

The sample I have can be found he
http://www.members.shaw.ca/AlbertKal.../msaccess.html

What is nice/interesting about my sample is that is specially designed to
enable ANY form with ONE LINE of code....

Thus, each time you build a new form, you can word merge enable it with
great ease.

Make sure you read the instructions from above, and you should eventually
get to the follwoing page
http://www.members.shaw.ca/AlbertKal...rge/page2.html


Note that the merge can also use a query, and thus you don't have to merge
just "one" record..

After the merge occurs, you get a plain document WITHOUT any merge fields,
and this allows the end user to save, edit, or even email the document
(since the merge fields are gone after the merge occurs).

Give the above a try€¦


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada


Unquote

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

wrote in message
...
By using DDE for a .mdb database, is this implying that Word 2007 cannot
communicate with an Access 2007 database via DDE?

When I try this with an Access 2007 database, it still does not work. The
query pulls
a value off a form to satisfy a criteria entry. When I run it, it prompts
for the value instead of pulling it off the form. This worked when both
the
Word document and the database were 2003, but in 2007, they don't work.
Do I
need to leave my Access database 2003?

"Peter Jamieson" wrote:

The only easy way to do it is to change the way that Word connects to
the data source to DDE

in Word 2007, check Office button-Word options-Advanced-Confirm file
format conversion on open (near the bottom), go through the connection
process again, and you should see an additional Confirm Data Source
dialog box. If you see an entry like "MS Access databases via DDE",
select it. If you only see "OLE DB database files" (typically if you are
using a .accdb rather than a .mdb source), check Show all, then locate
and select that DDE option, and continue. In Word 2003, the option has a
similar name under Tools-Options-General.

Peter Jamieson

http://tips.pjmsn.me.uk

On 21/02/2010 15:52, sailor wrote:
I am trying to create a Word mail merge with an Access database query
that
has a parameter (asks for a unique date).
When Word asks for "Select Recipients" I go to my database and the
dialog
box lists the database along with all of my Queries EXCEPT QUERIES THAT
HAVE
A PARAMETER so I cannot select the parameter query that contains the
list of
recipients that I want send to .
How do I get the parameter query to be listed so I can select it to be
the
target of my Mail Merge?
.

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using a query as a data source for a mail merge Ultraviolet47 Mailmerge 5 January 21st 07 03:02 PM
Mail Merge From Access Query hspgapsemc Mailmerge 1 May 21st 06 07:07 AM
Mail merge with Access DB does not see a query SarahB Mailmerge 8 November 29th 05 08:18 PM
AN SQL query as a data source for a word MAIL MERGE Lily@Insight Mailmerge 4 November 28th 05 02:05 PM
How do I Mail Merge from an Access Query? geordymac Mailmerge 2 February 9th 05 08:59 AM


All times are GMT +1. The time now is 02:30 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"