Solved

fetch the path of active document...

Posted on 2001-07-05
10
274 Views
Last Modified: 2012-05-04
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
0
Comment
Question by:neeraj523
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 4

Expert Comment

by:mcoop
ID: 6254744
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
0
 
LVL 22

Author Comment

by:neeraj523
ID: 6254767
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...
0
 
LVL 4

Expert Comment

by:Nazdor
ID: 6255120
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.


0
 
LVL 22

Author Comment

by:neeraj523
ID: 6255158
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...
0
 
LVL 4

Accepted Solution

by:
mcoop earned 100 total points
ID: 6255173
I'm thinking along the same lines.

Perhaps you need to look at some Outlook automation...
Change the default form so that you can't save attachments the 'normal' way, then add a new button with your own VB/VBA code underneath - that always saves the attachments in a specific location (perhaps based on application or title - up to you), then launches the document so you can view it.

This way you'll always know where the docs are, and can view them just as easily as the normal method.

As far as the user is concerned - they simply select the attachment and press a 'VIEW ATTACHMENT' button - the rest is automatically handled - but in a more structured way than Outlok would normally do it.

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 22

Author Comment

by:neeraj523
ID: 6255222
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...
0
 
LVL 4

Expert Comment

by:Nazdor
ID: 6256109
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.

0
 
LVL 4

Expert Comment

by:mcoop
ID: 6258767
I was wondering about that, but I thought the idea was intriguing in itself.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7148091
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
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7182069
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now