473,378 Members | 1,500 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 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 1743
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bruce Zigenfous | last post by:
Hello, I am using an ASP that uses a third party active-x control to upload a file to a file server using the ADO Stream Object. It uses the FileSystemObject to create folders and files, which...
0
by: John | last post by:
How do I get the name of the doc or any text file which is active(opened). I'm able to get the process information of the Word application, but how do I get the file Information (name of the file...
4
by: larry | last post by:
Hi, I would like to use window search to search a word in C# CS file which create by visual studio. But I can never get that word in the cs file. for example, I used a name space:...
4
by: naiya | last post by:
i have to develop a VB application which reads the text from a .txt file, and i have to write the contents of the file to an Excel sheet. the format of the .txt file is name age ...
4
by: sofiafig | last post by:
Hi, I have a file with several entries in the form: AFFX-BioB-5_at E. coli /GEN=bioB /gb:J04423.1 NOTE=SIF corresponding to nucleotides 2032-2305 of /gb:J04423.1 DEF=E.coli...
2
by: spidey12345 | last post by:
what i need this program to do is to read paragraphs like "st blah blh test ere se sit blha eere w" and then it will reformat to "st blah...
7
by: pbd22 | last post by:
Hi. I am somewhat new to this and would like some advice. I want to search my xml file using "keyword" search and return results based on "proximity matching" - in other words, since the search...
2
prabunewindia
by: prabunewindia | last post by:
hi friends, i want to store the file in byte array. plz help me. i am thinking we have t odo it thru file stream. i tried. but not getting how to use filestream plz help Prabu
11
by: T00l | last post by:
Hi I have the following 2 threads in a python script def recv_pkts(hdr, data): tmp= sys.stdout x = EthDecoder().decode(data) sys.stdout = open('c:\\scripts\\file.txt', 'a') print x
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.