Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling word documents from access?

Status
Not open for further replies.

Taleya

Programmer
Mar 9, 2000
12
AU
Hi<br>
<br>
Working on a DB that's killin' me at the moment - for a group of idiot lawyers.<br>
<br>
Basically, they want the moon, and the sun. But what I'm having problems with is the fact they want to mail merge from access. These people are real idiots - they don't even know how to mail merge??? Anyways - I've set up a template of a form letter for each query (they want to break down into sub-categories) I can get access to use the getobject to open it - in invisible mode, unalterable, unseeable, blahblahblah. I can get shell to open word.<br>
<br>
HOW THE HELL DO I GET IT TO OPEN THE TEMPLATE IN WORD FROM ACCESS????? &lt;foaming at mouth&gt; Microshite help is useless at this. I need to pass the path as a variable, rather than endlessly set the template name....<br>
<br>
Anyone know how to?
 
Have you tried OLE?<br>
You can manipulate word with full functionality by something like:<br>
Dim wd As Word.Application, tp As Template<br>
Set wd = CreateObject(&quot;word.application&quot;)<br>
Set tp = wd.Templates(1)<br>
tp.OpenAsDocument<br>
<br>
From here, the sky's the limit. You must add, in Tools¦References, the Office object lib and the Word lib.<br>
<br>
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top