Word button

H

Harmannus

Hallo,

I have a button on my form attached to a macro with the below code in the
line "RunApp"

C:\Program Files\Microsoft Office\Office10\Winword.exe
e:\documents\dbOfferte.dot

On opening Word the dot is opened instead of the doc variant. Can i add some
code to the above line so the doc file is opened?

Thanx for any tips!


Regards,

Harmannus
 
H

Harmannus

Typo ;-)

On opening Word the dot is opened instead of the doc variant. Can i add some
code to the above line so the "dot" file is opened?


Harmannus
 
H

Harmannus

Hallo,

It 's monday and its early in the morning over here ;-) No typo. The doc
file should by opened on addressing the dot file.


Harmannus
 
A

Art

Am I perhaps missing something here? If you open a
document based on a template, the template opens
automatically. If you open a blank document, normal.dot
opens, for example. Could you not simple address the
document to be opened?

HOPE THIS HELPS
 
H

Harmannus

Hallo,

Thanx for the reply.

dboffer.dot is a document with a link to a query in my database. So there is
no dboffer.doc variant.

If i address the dboffer.dot i would expect that the doc variant of the dot
file is opened. But no. Opening the dboffer.dot through my macro opens the
dot file. I would like the doc file to be opened.

Can this be done?

Regards,
Harmannus
 
A

Art

Hello again.

Now I'm really confused. You say there is no document
using this template. Then you say that you want the doc
variant to open when you call the template.

I know I'm losing something here, but I'm able to
determine what that is.

Sorry I couldn't help more
 
H

Harmannus

Hallo,

I have a template: dboffer.dot this dot file addresses a query in my db.

If i open the template dboffer.dot through the macro the dot file is opened.
If possible i want it to open the doc variant as it would normaly do when
you select a dot file in Word.


Regards,

Harmannus
 
A

Adrian Jansen

In other words you want a New document based on the .dot template. Yes you
can use Word automation to do this from within Access.

Dim objWord As Object

' Open Microsoft Word using automation
Set objWord = New Word.Application

objWord.Documents.Add "c:\dboffer.dot"
objWord.Visible = True

............ code to do whatever you want with the open doc..........


--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 

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

Similar Threads

Dot as doc? 1
Path to Word in Macro? 5
open word from access 2007 using a macro 7
Menubar 2
Locating winword.exe for RunApp Macro 1
Variable RunApp 4
Weeknumber is off 1
Batch file Open Word, run macro 0

Top