Hi,
How can I open a word document from a acess macro. In that doc i have information from my access database.
Thanks!
Hi,
How can I open a word document from a acess macro. In that doc i have information from my access database.
Thanks!
yes.
look into docmd method and openfile
as for the data being in the Word doc - one presumes you have already set up a Mail Merge template in Word.....
Hi,
how can I remove the message of sql accessing the database from my word template,
I would suggest this:
a. make a query in Access that supplies the raw data that you want. Give the query a name, save it.
b. then go to Word - create a new MailMerge Word document and point it at that query as its data source. Obviously give the doc a name, save it.
Then when you manually open the Word doc it should have the data merged.
Once all this is working manually - - then all you have to focus on is auto opening that Word doc from Access.
Now my problem is when i open the doc file it says that it is a document using SQL and if i want to allow this.
A simple click in yes bottom solves the problem.
But I want to skip this thing so my application works more fluently.
Thanks!!!
Most likely you're talking about the prompt where Word is asking if you would like to update your Mail Merge based on your Query results.
There's really no way around it if that's what's happening. If it's some sort of security prompt though, then you may be able to fix it by lowering your security settings in Office. However, that will need to be done for everyone using the document. And it can make you more vulnerable to Macro viruses and such so I don't recommend it.
or check a Word user forum - possible a guru on that side knows the answer to that question of the sql prompt....
I give as acquired now that i can do nothing about that.
I have another problem!!
I want to allow some one that presses a bottom to automatically generates the word document. I already maneged that bu i have some problems with the query that the word uses.
How can i run a macro to force a querie to have a certain criteria in a certain field. Using the [] in the design view does not word because of the word export.
maybe macro runSQL using a certain function??
Thanks all by helping me.
For that, I'd recommend using a Temporary Table. Then you can have your button replace the contents of that Table based on the Query.
how do i do that?