
Using VBA Automation to Open Word at the File Open Locatiion
Quote:
> I am not opening a document. How do I start Word.
Once you start a Word document, Word as an application is
also running. An Office document can't run without it's
application host.
You can get a reference in yr code to Word (as an application)
by refering to the document's parent.
Look at below lines run from the Excel VBE immediate window
Last line will make Word (as an application) go visible.
set d = getobject("d:\MyDocs\Word\Temp\TempDoc 1.doc")
? d.parent.name
Microsoft Word
? d.fullname
D:\MyDocs\Word\Temp\TempDoc 1.doc
d.parent.visible = true
Krgrds,
Perry
Quote:
> HTH
> Thanks for the reply.
> I quess I have to better understand how to start Word from
> Access without a document to open.
> Article Q209976 looks like these statements
> Dim objword as Word.document
> ' Make Word visible
> objword.Application.Visible = True
> I am not opening a document. How do I start Word.
> Thanks.
> Michael
> >-----Original Message-----
> >Hi Michael,
> >You can use something like
> >ChangeFileOpenDirectory Path:="C:\Temp"
> >Dialogs(wdDialogFileOpen).Show
> >or
> >With Dialogs(wdDialogFileOpen)
> > .Name = "D:\Temp"
> > .Show
> >End With
> >If you need a complete list of the arguments that the
> dialogs can use, then
> >have a look at the VBA help topic "Built-in dialog box
> argument lists".
> >Caveat utor: the argument list is incomplete and buggy. I
> use them sometimes
> >and have pretty good success with more common dialogs.
> >HTH
> >> I have been working on an application to merge documents in
> >> Word from an Acces database. I found a knowledge base
> >> article Q209976 about Merging that was helpful. Now
> >> rather than do the complete merge we would like instead to
> >> stop with Word open and the File Open dialog box open to
> >> the directory that contains the merge template documents.
> >> What would the command sequence be to permit this. I would
> >> have to open word but the place to stop is a dialog box not
> >> a document.
> >> Any pointers for help would be appreciated. Is there a
> >> resource that lists all possible commands? Thanks.
> >> Michael
> >.