471,071 Members | 1,209 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,071 software developers and data experts.

File Name(Word)

It's been 30min and haven't seen my post yet (sorry to
post twice).
Q: How do I get the file name(which is opened) of a
text/doc file if I have the process information of the
application(notepad/word) that opened/ceated the file.
Thanks alot.
Nov 13 '05 #1
1 1672
John,

You can't do it without doing some very specific coding against the
application that you know is running. If you know that word is running, you
can use the automation objects to access that instance of word and find out
which document is running in that process.

Notepad is a different story however. There is nothing in notepad that
is publically accessible that offers up what file is being worked on. If
you have a file open in notepad, the title of the file is in the toolbar,
but that is it. It does not give you the directory that the file came from.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"John" <wi********@hotmail.com> wrote in message
news:04****************************@phx.gbl...
It's been 30min and haven't seen my post yet (sorry to
post twice).
Q: How do I get the file name(which is opened) of a
text/doc file if I have the process information of the
application(notepad/word) that opened/ceated the file.
Thanks alot.

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Bruce Zigenfous | last post: by
reply views Thread by John | last post: by
4 posts views Thread by naiya | last post: by
4 posts views Thread by sofiafig | last post: by
11 posts views Thread by T00l | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.