Solved

fetch the path of active document...

Posted on 2001-07-05
10
273 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

706 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

19 Experts available now in Live!

Get 1:1 Help Now