A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - General Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Error while attaching attachments via code



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 19th 08, 03:12 PM posted to microsoft.public.exchange.admin,microsoft.public.outlook
John
external usenet poster
 
Posts: 135
Default Error while attaching attachments via code


Hi

I have a piece of vba code in ms access that sends emails with attachments
via outlook automation. This code has been running fine for years and this
problem has only recently come up. The problem is that the code runs and
sends emails with attachments to around 100 or so people and then the code
in Access stops on the line;

objOutlookMsg.Attachments.Add "F:\Folder 1\8 Mailshots\2008\Feb 08 (2).doc"

with the below error;

Automation error (Error 440)

err.Number: -36683771

err.Description: Can't create file: Feb 08 (2).doc. Right-click the folder
you want to create the file in, and then click Properties on the shortcut
menu to check your permissions for the folder.

err.Source: Microsoft Office Outlook

If I continue the code after a few seconds pause then another few emails are
sent before this error comes up again and this process goes on. The outlook
version is 2003 and Exchange is 2003. Any help in resolving this problem
would be appreciated. Could it be there is a problem with exchange instead
of outlook and it is refusing to accept too many attachments at a time? As I
said this has been working fine for years with same code, outlook and
exchange versions. That is why it is confusing as to what suddenly went
wrong.

Thanks

Regards



Ads
  #2  
Old February 20th 08, 11:44 AM posted to microsoft.public.exchange.admin,microsoft.public.outlook
neo [mvp outlook]
external usenet poster
 
Posts: 718
Default Error while attaching attachments via code

This is a long shot, but check Outlook's securetemp folder to see how many
"feb 08" documents have when the error hits. Just so you know, Outlook can
only create 99 of them before wigging. (and the way it would number is up
"Feb 08 (99)" before throwing an error when it comes to opening said
attachment.

To determine what Outlook is using as a secure temp folder under Outlook
2003 is to open regedit and navigate to:
HKCU\Software\Microsoft\Office\11.0\Outlook\Securi ty and check out the
SecureTemp value on the right.

"John" wrote in message
...

Hi

I have a piece of vba code in ms access that sends emails with attachments
via outlook automation. This code has been running fine for years and this
problem has only recently come up. The problem is that the code runs and
sends emails with attachments to around 100 or so people and then the code
in Access stops on the line;

objOutlookMsg.Attachments.Add "F:\Folder 1\8 Mailshots\2008\Feb 08
(2).doc"

with the below error;

Automation error (Error 440)

err.Number: -36683771

err.Description: Can't create file: Feb 08 (2).doc. Right-click the folder
you want to create the file in, and then click Properties on the shortcut
menu to check your permissions for the folder.

err.Source: Microsoft Office Outlook

If I continue the code after a few seconds pause then another few emails
are sent before this error comes up again and this process goes on. The
outlook version is 2003 and Exchange is 2003. Any help in resolving this
problem would be appreciated. Could it be there is a problem with exchange
instead of outlook and it is refusing to accept too many attachments at a
time? As I said this has been working fine for years with same code,
outlook and exchange versions. That is why it is confusing as to what
suddenly went wrong.

Thanks

Regards





 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Attaching attachments Youie Outlook and VBA 3 September 12th 07 05:56 AM
Attachments will not open for the recipient. They arrive in code. einekleinejazz Outlook - Installation 1 March 14th 07 05:42 PM
Sample Code for Merge With Attachments? LongWayFromHome Outlook and VBA 13 August 18th 06 05:04 PM
VBA Code to put in Access that will send an Email with Attachments [email protected] Outlook and VBA 1 April 9th 06 05:30 PM
ICS attachments shows as HTML code and can't answer Zanvetto Outlook - Calandaring 0 February 16th 06 08:04 PM


All times are GMT +1. The time now is 12:19 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.