____ Return file path via APIs !!!!

G

Guest

Hi there,

How can I get from XL the path of an open Document in Word without using
Automation ? (Maybe through APIs)

Regards.
 
T

Tom Ogilvy

Sub WDTest()
Dim WD As Object
Set WD = GetObject(, "Word.Application")
MsgBox WD.ActiveDocument.Path
Set WD = Nothing
End Sub
 
G

Guest

Dear Tom,

As I mentioned in my post , I don't want to use Automation. I am looking for
an alternative solution.

The reason I don't want automation is because I want to extend this to other
applications that don't necessarly support Automation.

Also, if I wanted to retrieve the file path of the active workbook opened in
a second Excel instance the GetObject function wouldn't work .

Any idea about an alternative to Automation (ie GetObject function) ?
There's got to be an API solution to this .

Regards.
 

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

Top