Outlook2003 unable to save atchmnt using vbscript

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

I am trying to automate the saving of attachments of open
mail messages (using vbscript).
I cannot save the attachment successfully!
This is the error I get:
Error: Cannot save the attachment. You don't have
appropriate permission to perform this operation.
Code: 80070005
Source: Microsoft Office Outlook

Thanks in advance!
=Steve
 
It might be more helpful if you posted your code for us to review.

Do you have write access to the folder you are saving the attachments to?
 
Eric - Thanks:

Hope this helps.
I am loged in as the Admin: on the client laptop!
As a user to the exchange 2003 / outlook 2003
server/client.

I don't even need to open the mail item.
I have another script already opening it for me.
One other problem I had was the attachment name.
The first time I tried it- I could not save the attachment
because the attachment did not have an extension.
When I added an extension to the file - I got one step
further but I got the error noted below!!

Here is the script-


******************************
'Save Attachment

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.ActiveInspector.CurrentItem
Set myAttachments = myItem.Attachments

myAttachments.Item(1).SaveAsFile "C:\email"

******************************
 
Just guessing here

but if you try

Filename = myAttachments.Item(1).fileName

myAttachments.Item(1).SaveAsFile "C:\email\" & filename
 
Back
Top