Link to home
Start Free TrialLog in
Avatar of neeraj523
neeraj523Flag for India

asked on

fetch the path of active document...

Hi all..

I m tring to right a program which could be able to fetch the path of the active PDF/DOC/XLS files... a mean suppose i opened a acrobat1.pdf file in the acrobat reader.. now i want to run a Vb application which could able to find the active file in the Acrobat Reader ie. acrobat1.pdf and give me the path of that file...

can anyboud help me??

Thanx
Neeraj
Avatar of mcoop
mcoop

Hmmm.. possible but it would not be easy or consistent between apps.

listening

BTW:  What is this for - there may be an easier way to return similar results
Avatar of neeraj523

ASKER

actually i m getting number of document by mail and when i m reading these as my mail attachment.. i required to save the docuemnt i m reading at some specific folder.. for that i will just open a Vb application.. which will pick the path of the active document and then i will specify the path where i want to save the file...
In Word/Excel etc, you can just do use the File->Save As menu then specify where you want to save the file.  

So you don't really need a VB app for that...(perhapse you do).


If Acrobat Reader you can do File->Document Info->General to get where the file location is.

There's no "generic" method, but this could be acheived by taking each application one-by-one.


However, if they're from mail attachments, then you're almost guaranteed to find them in the same place every time - your windows temp folder!

This is because the mail program will extract the attachment to Temp, then open the file from there, then delete the file when you close it (normally).  


But you should be able to do some sort of "Save As" from your e-mail program in the first place.


dear nazdor..

Are u sure what you r talking is for me... my dear that i know i can save it by opening the file menu or so what... but i m looking for.. how to handle this programeticaly...
ASKER CERTIFIED SOLUTION
Avatar of mcoop
mcoop

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
dear nazdor..

Are u sure what you r talking is for me... my dear that i know i can save it by opening the file menu or so what... but i m looking for.. how to handle this programeticaly...
The only reason I can think of to need to do this is to be able to dubiously snoop on what people are looking at in their attachments (ie, start a program when they're not there then pop back at the end of the day and have a look).  

You can do that much more easily by programming Outlook directly or simply monitoring the Temp folder!

Otherwise, why write a program to do something which only takes two mouse clicks?

/me looks confused.

I was wondering about that, but I thought the idea was intriguing in itself.
Avatar of DanRollins
Hi neeraj523,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept mcoop's comment(s) as an answer.

neeraj523, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
Comment from expert accepted as answer

Computer101
E-E Moderator