Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending query results to table in MS Word document 1

Status
Not open for further replies.

bab

Programmer
Dec 1, 2000
4
US
I'm having trouble sending a set of query results to MS Word. I open Word and add a document, send text ok, now I want to send the results of a query and can't get that to work.

I tried and failed to get the syntax correct for the insertdatabase method. I've tried things like:

With wDoc
.Content.InsertAfter ("Hi") 'this works
.Content.InsertDatabase(wdTableFormatSimple2, 191, False, "Query CompanyResults") 'this fails
.SaveAs Filename:="c:\test.doc"
end with

I'm sure my syntax is completely off, but I can't seem to find documentation on how to fix it! Many thanks for any help! X-)
 
Bab,
I had a situation were I had to send a query result as a report everyday via email to several people. What I did was to pull the query through a report and the save the report(
Code:
DoCmd.OutputTo acOutputReport, "myreport", acFormatRTF, "myreport.rtf", False
. For what it's worth this is something to try.
Scoty ::)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top