How do I get an added attachment's path? 
Author Message
 How do I get an added attachment's path?

Is there a way to get the local filesystem path to a file that was just
attached?
I'm using Outlook 2000 and 2002 on 98, Me, 2000,XPh,XPp

There seems to be Outlook object model support and EMAPI property hooks for
getting the path of an attachment, but all I ever see is the simple,
pathless, filename.

I just want to catch the AttachmentAdd event, and query the added
attachment's .FileName and .PathName properties, so I can go work with the
file in the local filesystem.

Unfortunately, it looks like .PathName is documented only to be valid if you
attach a link to a file, rather than the file itself...and the pathname then
points to the linked file, not the attachment (the link file) itself.  (And
.LNKs don't work very well nowadays, anyway, what with machine-name
transposition and security patches.)

Thanks,
    -Dan Haygood



Tue, 15 Jun 2004 03:46:31 GMT  
 How do I get an added attachment's path?
Once you've added the attachment, Outlook apparently doesn't know or care
where the attachment came from.

--
Sue Mosher, Outlook MVP
   Outlook and Exchange Solutions
   at http://www.slipstick.com


Quote:
> Is there a way to get the local filesystem path to a file that was just
> attached?
> I'm using Outlook 2000 and 2002 on 98, Me, 2000,XPh,XPp

> There seems to be Outlook object model support and EMAPI property hooks
for
> getting the path of an attachment, but all I ever see is the simple,
> pathless, filename.

> I just want to catch the AttachmentAdd event, and query the added
> attachment's .FileName and .PathName properties, so I can go work with the
> file in the local filesystem.

> Unfortunately, it looks like .PathName is documented only to be valid if
you
> attach a link to a file, rather than the file itself...and the pathname
then
> points to the linked file, not the attachment (the link file) itself.
(And
> .LNKs don't work very well nowadays, anyway, what with machine-name
> transposition and security patches.)

> Thanks,
>     -Dan Haygood



Tue, 15 Jun 2004 05:46:08 GMT  
 How do I get an added attachment's path?
Thanks, that's a shame.  - Dan



Quote:
> Once you've added the attachment, Outlook apparently doesn't know or care
> where the attachment came from.

> --
> Sue Mosher, Outlook MVP
>    Outlook and Exchange Solutions
>    at http://www.slipstick.com



> > Is there a way to get the local filesystem path to a file that was just
> > attached?
> > I'm using Outlook 2000 and 2002 on 98, Me, 2000,XPh,XPp

> > There seems to be Outlook object model support and EMAPI property hooks
> for
> > getting the path of an attachment, but all I ever see is the simple,
> > pathless, filename.

> > I just want to catch the AttachmentAdd event, and query the added
> > attachment's .FileName and .PathName properties, so I can go work with
the
> > file in the local filesystem.

> > Unfortunately, it looks like .PathName is documented only to be valid if
> you
> > attach a link to a file, rather than the file itself...and the pathname
> then
> > points to the linked file, not the attachment (the link file) itself.
> (And
> > .LNKs don't work very well nowadays, anyway, what with machine-name
> > transposition and security patches.)

> > Thanks,
> >     -Dan Haygood



Tue, 15 Jun 2004 08:11:07 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Adding attachment in Outlook: Can this be done?

2. Getting Attachment Path from an Email

3. .Attachments.Add - but can't find the file

4. Getting a File's name and Path

5. Getting the path to a file's parent application out of the registry

6. Help, I'm getting Path/File Error

7. Getting An App's Path

8. Getting a File's Dos Name and Path

9. add name of attachment to Subject line and delete attachment

10. ADO thinks DBMS is done, but DBMS ain't done

11. Adding path to Path entry

12. Attachments path

 

 
Powered by phpBB® Forum Software