Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default ____ Return file path via APIs !!!!

Hi there,

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

Regards.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default ____ Return file path via APIs !!!!

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

--
Regards,
Tom Ogilvy


"RAFAAJ2000" wrote in message
...
Hi there,

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

Regards.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default ____ Return file path via APIs !!!!

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.





"Tom Ogilvy" wrote:

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

--
Regards,
Tom Ogilvy


"RAFAAJ2000" wrote in message
...
Hi there,

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

Regards.





  #4   Report Post  
Posted to microsoft.public.excel.programming
jaf jaf is offline
external usenet poster
 
Posts: 300
Default ____ Return file path via APIs !!!!

Hi,
This is VB6. It should run with a little modification. Zipfile is at the
bottom of the page.
http://vb.mvps.org/samples/project.asp?id=TaskList


--
John
johnf202 at hot mail dot com


"RAFAAJ2000" wrote in message
...
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.





"Tom Ogilvy" wrote:

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

--
Regards,
Tom Ogilvy


"RAFAAJ2000" wrote in message
...
Hi there,

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

Regards.







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open Dialog Box to return Selected File Path and Not Open it. DMS Excel Programming 4 January 26th 10 12:46 PM
Formula too long - new file path is shorter than old file path - Excel 2003 Greg J Excel Worksheet Functions 1 November 22nd 06 05:16 PM
Recursive Function + File searching to return path ph8[_6_] Excel Programming 24 October 14th 05 08:45 AM
Return file from a path string Tom Ogilvy Excel Programming 1 August 23rd 05 06:26 PM
Return file from a path string Bob Phillips[_6_] Excel Programming 0 August 23rd 05 06:16 PM


All times are GMT +1. The time now is 07:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"