Solved

How to open Word templates from Access

Posted on 2008-10-22
3
757 Views
Last Modified: 2013-11-27
I want Access to open a document as a blank using a template I define. Right now I have this code and it works and it opens the correct document, but if I work it as a *.dot ( Word template), then it opens the template for editing, not a blank document.

How can I open the template as a blank, like when you do Word manually?

>>>
    Dim word As word.Application
   
    Set word = CreateObject("Word.Application")
    word.Visible = True
    word.Documents.Open ("\\ctx\Joblog\Word Docs\STATECOMPLIANCE blank.doc")
0
Comment
Question by:onepiolin
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
Jupiler78 earned 500 total points
ID: 22779487
Hello onepiolin,

you should use:
word.documents.add()
the first param then is: The name of the template to be used for the new document. If this argument is omitted, the Normal template is used
the second: True to open the document as a template. The default value is False

Regards,

Jupiler78
0
 
LVL 16

Expert Comment

by:Sheils
ID: 22780021
The is a good easy mail merge that you can incorporate into your database.

http://www.members.shaw.ca/AlbertKallal/wordmerge/index.html

0
 
LVL 8

Expert Comment

by:Jupiler78
ID: 22802132
Glad I could help.
Thanks for the points & grade.
Good luck.

Jupiler78
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question