Attachment.PathName is always blank

B

BuddyWork

Hello,

I need the location of where the attach file is located because I need to
pass the path and name to another component which will read the file and then
send it to SharePoint.

Any idea?

Thanks,
 
S

Sue Mosher [MVP]

That's perfectly normal if the attachment is contained in the item. There is
no external path in that case. The PathName will always be blank unless the
attachment is actually a shortcut to an external path.

If you need to make the attachment available to another component, call its
SaveAsFile method to save it to a local or network folder.
 
B

BuddyWork

Is there away in getting the path and name before the file is actually
attached?

I am using Outlook 2003.
 
S

Sue Mosher [MVP]

That folder really isn't useful for your scenario, because (a) unless an
explicit location is set in the registry (which is rare), there's no
guarantee that you'll be able to find it and (b) the file you want may no
longer be stored in this temporary storage location. You should use
SaveAsFile instead to ensure you have control over the file and the location
where it's made available to the other component.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top