Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / February 2005

Tip: Looking for answers? Try searching our database.

Record Macro Using MS Word and MS Query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JaMaPoR@gmail.com - 09 Feb 2005 20:40 GMT
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?
Doug Robbins - 09 Feb 2005 23:55 GMT
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.

Signature

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

>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
[quoted text clipped - 4 lines]
> created on the fly. Has anybody successfully recorded actions in MS
> Query using a MS Word Macro?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.