Solved

How to open Word templates from Access

Posted on 2008-10-22
3
751 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Server 2012 management. 5 23
Can not open the Access Help ? 3 53
How can I Flash a mandatory field in Access Form? 13 46
Access query expression 6 20
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

786 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