Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insufficient Memory

Status
Not open for further replies.

gloudo

Programmer
Feb 3, 2002
34
NL
Hi there,

I Have A script to sent a workbook with Outlook from Excel.
But When I try the script, I get the Message "Insufficient Memory" What's Wrong With The Script? Or Maybe there is a more easy way to sent the Workbook?

Sub Verzenden()
Dim objOL As Outlook.Application
Dim objMail As MailItem
Dim MailAd As String
Dim Msg As String
Dim Subj As String
Dim URLto As String
Dim Attach As Attachment

Set objOL = Outlook.Application
Set Mail = objOL.CreateItem(olMailItem)

With objMail
MailAd = "RCA (LT)" + ";" + "Ontvangst FD"
Subj = "Test"
Msg = Msg & "Dit is een Test"
Attach = "C:\data\thijs\test.txt"

URLto = "mailto:" & MailAd & "?subject=" & Subj & "&body=" & Msg & "Attachment=" & Attach
ActiveWorkbook.FollowHyperlink Address:=URLto
End With

Set objMail = Nothing
Set objOL = Nothing

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top