____ Return file path via APIs !!!!

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
Sub WDTest()
Dim WD As Object
Set WD = GetObject(, "Word.Application")
MsgBox WD.ActiveDocument.Path
Set WD = Nothing
End Sub
 
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.
 
Back
Top