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 and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Is there any restrictions to the number of Attachment i can add?



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4  
Old June 18th 09, 02:02 AM posted to microsoft.public.outlook.program_vba
Junior728
external usenet poster
 
Posts: 3
Default Is there any restrictions to the number of Attachment i can ad

Hi,

I think there is some other things that causes the error. I did not save
the error. But now i have retry again, and it works.

thanks for the advice anyway.

"Dmitry Streblechenko" wrote:

What is the exact error?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Junior728" wrote in message
...
Hi,

I am able to add the 3 attachment and automate it in vba. However,
whenever,
i added the 4th attachment, it will produce error. See my script below:

Sub Freight()


Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)


With OutMail

Dim cell As Range
Dim strto As String
Dim strbody As String
Dim strbody1 As String

LastRow = Cells(Rows.Count, "A").End(xlUp).Row
strbody = " Pls do not reply to this email. This is an automated email
generated to the intended parties.Thanks!"
strbody1 = " Pls disregard Rev 9B from the previous email sent and use
this Rev 10 effective date 29 June 09!"
For Each cell In ThisWorkbook.Sheets("EmailAdd").Range("A2",
Cells(LastRow, "A"))
If cell.Value Like "?*@?*.?*" Then
strto = strto & cell.Value & ";"
End If
Next cell
If Len(strto) 0 Then strto = Left(strto, Len(strto) - 1)

.BCC = strto
.Subject = "Supplier Freight Arrangement Guidelines Rev 10 (Pls
disregard Rev 9B)"
.Body = strbody
.Body = strbody1
.Attachments.Add
("S:\SiteData\SIN2\EMS\Purchasing\Pur\JMatls\Freig ht Guidelines for
Suppliers\Supplier Memo.pdf")
.Attachments.Add
("S:\SiteData\SIN2\EMS\Purchasing\Pur\JMatls\Freig ht Guidelines for
Suppliers\ Routing Guide (Rev 10).pdf")
.Attachments.Add
("S:\SiteData\SIN2\EMS\Purchasing\Pur\JMatls\Freig ht Guidelines for
Suppliers\Worksheet in Routing Guide (Rev 10).pdf")
.Send 'or use '.Display
End With

Set OutMail = Nothing
Set OutApp = Nothing


Workbooks("Freight Macro.xls").Close SaveChanges:=True
Application.CommandBars("CreateOutlookMsg").Delete
End Sub


So i wish to know backend, is there any limitations of the no of
attachment
to be added in an email send out by using vba. If using buttons, it should
not be a problem





 




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
Outlook rules restrictions Zadig Galbaras Outlook - General Queries 15 May 8th 08 05:42 PM
Working with SMTP Restrictions TC Outlook - General Queries 1 February 1st 07 10:04 PM
Mailbox restrictions not working? Chris Weber Outlook - General Queries 0 May 2nd 06 07:24 PM
Autoaccept restrictions by user Boe Outlook - Calandaring 1 April 25th 06 06:23 PM
Browsing Restrictions Cgriffin Outlook Express 1 February 18th 06 11:20 PM


All times are GMT +1. The time now is 06:01 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.