Hello. I have an Excel macro that sends out email to my vendors on a weekly basis using a mail-in dbase so that their responses can be seen by everyone in my team. I am now in need of adding an attachment for them as well. The macro I have for some reason imbeds a rich text version of the spreadsheet instead of actually attaching the .xls file itself.
I was not able to get the background version of the macro I have to work with a mail-in dbase (although it sends the attachment properly), so I switched to the foreground version I’ve included here.
Can you please tell me what I am missing??
Also, can someone explain what the two double-quoted parameters in this line mean? I cannot find any info on it.
—> NotesUIDoc.CreateObject(“”, “”, “C:\temp\test.xls”)
Thanks, and I appreciate any help on this situation.
=========
Here is the code I have so far in case it helps anyone else out.
Dim workspace As Object
Dim NotesUIDoc As Object
Set workspace = CreateObject(“Notes.NotesUIWorkspace”)
sRecipient = “vendor@host.com”
ssubject = “Mail-In DB Test”
On Error Resume Next
Call workspace.OpenDatabase(“MyServer”, “mailin\mailindb.nsf”) ’
Set NotesUIDoc = workspace.COMPOSEDOCUMENT(“”, “”, “Memo”)
Call NotesUIDoc.FIELDSETTEXT(“EnterSendTo”, sRecipient)
Call NotesUIDoc.FIELDSETTEXT(“Subject”, ssubject)
NotesUIDoc.GOTOFIELD “Body”
NotesUIDoc.InsertText “Test Message”
Call NotesUIDoc.CreateObject(“”, “”, “C:\temp\test.xls”)
NotesUIDoc.SEND
NotesUIDoc.Close
AppActivate “Lotus Notes”
Application.SendKeys “y”
Set NoteUIDoc = Nothing
Set workspace = Nothing