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
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