Get Another Program's Current Document?
Get Another Program's Current Document?
Get Another Program's Current Document?
Get Another Program's Current Document?
Get Another Program's Current Document?
Get Another Program's Current Document? Get Another Program's Current Document? Get Another Program's Current Document? Get Another Program's Current Document? Get Another Program's Current Document? Get Another Program's Current Document? Get Another Program's Current Document? Get Another Program's Current Document?
Get Another Program's Current Document? Get Another Program's Current Document?
Get Another Program's Current Document?
Go Back  Xtreme Visual Basic Talk > > > Get Another Program's Current Document?


Reply
 
Thread Tools Display Modes
  #1  
Old 01-19-2005, 03:17 PM
Xak Xak is offline
Freshman
 
Join Date: Sep 2004
Posts: 35
Default Get Another Program's Current Document?


Hello,

Wasn't sure if this should go in General or not, but I thought I/O would be a good place for sure.

I'm basically wanting to know how to have my program return the filepath and name of a file opened in a currently running program.

For example, if I have Paint open and a bitmap loaded in it or Word open and a document loaded into that, how can i have my program put the path and name to that file into, lets say a textbox?

I think this is kind of vague, so if you want more details just ask.
Reply With Quote
  #2  
Old 01-21-2005, 01:48 PM
lebb's Avatar
lebbGet Another Program's Current Document? lebb is offline
Disillusioned Code Poet

Retired Moderator
* Guru *
 
Join Date: Apr 2002
Location: Tennessee, USA
Posts: 12,808
Default

With a Word document, you could automate Word using the Office libraries and find the document path using Word's object model. I don't believe Paint provides any support for automation, so I doubt there would be any way to retrieve this information from Paint unless it happens to put the path in the titlebar. If you're asking about how to do this more generically for any application, I don't believe it is possible because the method is going to vary for each application (even among Office applications, it is quite different).
__________________
Laura

Ita erat quando hic adveni.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Get Another Program's Current Document?
Get Another Program's Current Document?
Get Another Program's Current Document? Get Another Program's Current Document?
Get Another Program's Current Document?
Get Another Program's Current Document?
Get Another Program's Current Document? Get Another Program's Current Document? Get Another Program's Current Document? Get Another Program's Current Document? Get Another Program's Current Document? Get Another Program's Current Document? Get Another Program's Current Document?
Get Another Program's Current Document?
Get Another Program's Current Document?
 
Get Another Program's Current Document?
Get Another Program's Current Document?
 
-->