473,909 Members | 5,630 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(not epad/word) that opened/ceated the file.
Thanks alot.
Nov 13 '05 #1
1 1777
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************* *@exisconsultin g.com

"John" <wi********@hot mail.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(not epad/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
1559
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 works fine. If the file does not exist, it saves the file (Word.doc), if it does exists, it checks to see if the file is open. If it is open, and another user is trying to save or overwrite the same file, I trap an Error 3002 (document open),...
0
1102
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 the word opened) from the process? Thanks in advance
4
4038
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: "myTopNameSpace.NameSpaceOne" window search window: file name: *.* A word: "myTopNameSpace"
4
4098
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 company abc 23 xyz def 18 ghy ... and so on now when i load this data into an excel sheet, all diff information shouls appear in different cells of the excel...
4
1713
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 7,8-diamino-pelargonic acid (bioA), biotin synthetase (bioB), 7-keto-8-amino-pelargonic acid synthetase (bioF), bioC protein, and dethiobiotin synthetase (bioD), complete cds.
2
2554
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 blh test ere se sit blha eere w" ....
7
2629
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 string will often not produce a direct match, the results will be based on proximity (50%, 20% 100%, etc). are there any good examples out there on how to do keyword searches on XML data? How should i set up my xml file so
2
9702
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
1880
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
10037
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10921
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10540
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9727
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5938
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6140
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4336
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3359
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.