By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,673 Members | 1,268 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,673 IT Pros & Developers. It's quick & easy.

File Name(Word)

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.