Exporting Data From Access To a Word Template

H

Heather Irvin

So far I've created a Contact List Database, from there you can click a
button to open up a Company Fax Transmittal Word Template. It is populated
with the info from the Database. This works fine.

Problem is, the script opens up the Template as .dot
If you simply open the template noraml it opens as .doc

here is the script I'm using... any suggestions on how to get the template
to open up correctly (.doc)would be great.

Dim oApp As Object
Dim doc As Object
Dim strDocName As String

Set oApp = CreateObject("Word.Application")
oApp.Visible = True

strDocName = "F:\Data\Headquarters\Information
Technology\Helpdesk\Templates\AC FaxTrans.dot"
Set doc = oApp.Documents.Open(strDocName)

doc.FormFields("Fax_to").Result = Forms!User!Name.Value
doc.FormFields("Fax_Number").Result = Forms!User!Phone.Value

Set oApp = Nothing

Thanks
Heather
 

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

Top