Reply
 
Thread Tools Display Modes
  #1   Report Post  
 
Posts: n/a
Default Record Macro Using MS Word and MS Query

I am attempting to create a macro that takes in a user input and uses
that input in a query in MS Query, which in turn uses the produced data
as the data source for a mail merge. However, when recording a macro,
it seems as if it does not record actions performed in MS Query. I
thought of saving it as a query (*.qry), and use this as the data
source, but the query is based upon user input, and thus must be
created on the fly. Has anybody successfully recorded actions in MS
Query using a MS Word Macro?

  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

The macro recorder is useful for some purposes, but what you are trying to
to is not one of them. You could probably use a userform the get the input
and the create the necessary SQL statement with it. But it's something for
which you will need to resort to the use of the Visual Basic Editor.

The article on userforms at
http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm

deals with an entirely different use of userforms, but it may help get you
started.


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
wrote in message
oups.com...
I am attempting to create a macro that takes in a user input and uses
that input in a query in MS Query, which in turn uses the produced data
as the data source for a mail merge. However, when recording a macro,
it seems as if it does not record actions performed in MS Query. I
thought of saving it as a query (*.qry), and use this as the data
source, but the query is based upon user input, and thus must be
created on the fly. Has anybody successfully recorded actions in MS
Query using a MS Word Macro?



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
creating forms Fluffypink Microsoft Word Help 4 March 9th 05 04:17 PM
Boiletplates from Word Perfect linda Microsoft Word Help 1 January 28th 05 05:37 PM
How do I create & merge specific data base & master documents? maggiev New Users 2 January 12th 05 11:30 PM
In typing dates in Word, i.e. "January 12" how do you keep the "1. Carol Microsoft Word Help 2 January 12th 05 08:09 PM
word xp crashes after macros are recorded kharris0405 Microsoft Word Help 3 January 11th 05 10:50 PM


All times are GMT +1. The time now is 08:46 AM.

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"