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!

Driving me crazyyy

Status
Not open for further replies.

Taleya

Programmer
Mar 9, 2000
12
AU
ok, I posted earleir regarding opening a word document from access?<br>
<br>
Now, I can get it to work using this code:<br>
<br>
Dim mailmerge as Object<br>
<br>
Set mailmerge = getobject(e:\test.dot&quot;)<br>
mailmerge.application.Visible = true<br>
<br>
Now, I can get this to work in access 2000. But not in 97 (which is what the client needs) Can anyone else get this code to word on a on_click event? (You'll need to change the SET path) I only have access to one copy of access 97 at work - and I'm also running server based access 95 and access 2.0. Is it a problem with my version of access 97 (and will therefore work with the clients) or is it just something that won't work with access 97 full stop?<br>
<br>
Can someone please try it out and tell me?<br>
<br>
Taleya <p>Taleya<br><a href=mailto:thezoomistress@yahoo.com.au>thezoomistress@yahoo.com.au</a><br><a href=homepages.ihug.com.au/~taleya>Gorillaweed Graphics</a><br>You spam me, I castrate you
 
I have bettter luck using this.<br>
<br>
Dim WordPath, DocPath, MacroName As String<br>
Dim Retval As Variant<br>
WordPath = &quot;C:\Microsoft Office97\Office\Winword.exe&quot;<br>
DocPath = &quot;X:\MyDoc.doc&quot;<br>
'MacroName = &quot;/M&quot; & &quot;Marconame&quot;<br>
Retval = Shell(WordPath & &quot; &quot; & DocPath & &quot; &quot; & MacroName, vbMaximizedFocus)<br>
<br>
I just tested it<br>
<br>
<br>
<p> DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br>
 
That code works great too...but I can't use it! This may end up as a mass-produced application, so I can't hardcode the application path (Especially since I'm working on a server based as well) Thanks anyway...<br>
<br>
(plotting to adapt the shell statement to automatically run word with those criterion...hey, come full circle....) <p>Taleya<br><a href=mailto:thezoomistress@yahoo.com.au>thezoomistress@yahoo.com.au</a><br><a href=homepages.ihug.com.au/~taleya>Gorillaweed Graphics</a><br>You spam me, I castrate you
 
This was just an example to show syntax.<br>
Ok so put it in a variable and store it in a Utility table<br>
Or there are dozens of ways to get it on the fly.<br>
you are using VBA remember.<br>
<br>
<p> DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br>
 
Taleya,<br>
Check the References for the Word Objects. Open a module, then under Tools¦references, find Microsoft Word Object Library. This should do it.<br>
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top