Word button

  • Thread starter Thread starter Harmannus
  • Start date Start date
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
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
Back
Top