What am I missing in my code? everything is registered (DLL) and it worked fine yesterday. Wondering if IT did something, but I want to verify before I speak with them.
Code:
Public Function SendMail(AddrTo As String, _
AddrCC As String, _
AddrBCC As String, _
Subj As String, _
MsgBody As String, _
Optional strAttachments As String) As Boolean
Dim AttachArray() As String ' Contains attachment file names
Dim AttachItem As Variant ' Single attachment
Dim Success As Boolean ' Whether the function completed successfully
Dim Test As New RDOSession
'- Log into email using current users credentials:
Test.Logon
Set mail = Test.GetDefaultFolder(olFolderOutbox).Items.Add("IPM.Note")
On Error GoTo ErrorHandler:
mail.Subject = Subj
mail.HTMLBody = MsgBody
mail.Recipients.Add AddrTo
The error: "Compile Error: Variable not defined"
happens on row SET MAIL = Test.GetDefaultFolder(olFolderOutbox).Items.Add("I PM.Note")
Thanks