Solved

How to open Word templates from Access

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now