Connecting Tech Pros Worldwide Forums | Help | Site Map

opening ms word

stoker
Guest
 
Posts: n/a
#1: Nov 12 '05
can anybody, please, tell me how to open prepared earlier ms word document
or template from ms access vba code?
all my efforts failed. ive managed to open empty document, but when i want
to open my own one then opens a copy of database im currently running. its
interesting when u c filename "whatever.doc" and access opens...
i will be gratefull for any help.

*-*-*
best regards
stoker



Pieter Linden
Guest
 
Posts: n/a
#2: Nov 12 '05

re: opening ms word


"stoker" <stoker@w-s.pl> wrote in message news:<bu70c2$l7v$1@inews.gazeta.pl>...[color=blue]
> can anybody, please, tell me how to open prepared earlier ms word document
> or template from ms access vba code?
> all my efforts failed. ive managed to open empty document, but when i want
> to open my own one then opens a copy of database im currently running. its
> interesting when u c filename "whatever.doc" and access opens...
> i will be gratefull for any help.
>
> *-*-*
> best regards
> stoker[/color]

How to open a template through code:
http://www.mvps.org/access/modules/mdl0043.htm

How to open a word doc through code:

Something like....
'Horrible code coming...
Public Function OpenWordDoc(ByVal strDoc As String)
Dim appWord As Word.Application
Set appWord = New Word.Application

appWord.Documents.Open (strDoc)
appWord.Activate

End Function
Closed Thread