How can i open a Microsoft Word file thru code?

  • Thread starter Thread starter Mota
  • Start date Start date
M

Mota

Hello;
I have some word templates in my computer.If i want to put a button on a
form to open them,supposing one of them is in
F:\MyWordDocs\Register.doc,what would be the code can open it?
As my 2nd question,these templates need just a name before printing.We have
all these names in our tables (i.e DoctorsTBL).
Is there a way to send a name as an argument to a Word Template,so that it
open with that name in its own place?
Thank you in advance for your help.
 
Hello;
I have some word templates in my computer.If i want to put a button on a
form to open them,supposing one of them is in
F:\MyWordDocs\Register.doc,what would be the code can open it?
As my 2nd question,these templates need just a name before printing.We have
all these names in our tables (i.e DoctorsTBL).
Is there a way to send a name as an argument to a Word Template,so that it
open with that name in its own place?
Thank you in advance for your help.

To open a Word document from Access:
Application.FollowHyperlink "F:\MyWordDocs\Register.doc"

To supply a name from Access to your Word document, create a MailMerge
document. See Word Help for more information.
(Post to a Word newsgroup to get help with this.)
 
Dear Fred;
Can a mail merge be created and done from code?
Thank you for your attention.
 
An alternative to the last part is to

In the template create a bookmark where you want the field to go and
save the template.

from access
with visible false open word.
move the field to the bookmark
save the document and exit

then do the follow hyperlink.
 
Dear Ron;
What do you mean of "From Access with visible false open word" ?
Thank you for your attention
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top