I am using a VBA script using lotusscript to copy excel cell data and paste into a newly created memo. I am able to fill in the fields such as subject, to, cc, bcc.
From a excel macro, this script creates a new memo and the user verifies the content and hits send in lotus notes client.
The only problem is we still have to click on [Delivery Options], then [Advanced], and then fill in an email address into the field [Replies to this memo should be addressed to:]
I attempted to ‘guess’ at what this field is in my script, but cannot guess the right one, I get message “Run-Time error ‘7412’: Notes Error - Cannot locate field”
Can someone let me know what this field is called or another way of doing this?
Here is my code.
Dim Notes As Object
Dim db As Object
Dim WorkSpace As Object
Dim UIdoc As Object
Dim UserName As String
Dim MailDbName As String
Set Notes = CreateObject(“Notes.NotesSession”)
UserName = Notes.UserName
MailDbName = Left$(UserName, 1) & Right$(UserName, (Len(UserName) - InStr(1, UserName, " "))) & “.nsf”
Set db = Notes.GetDataBase(vbNullString, MailDbName)
Set WorkSpace = CreateObject(“Notes.NotesUIWorkspace”)
Call WorkSpace.ComposeDocument(, , “Memo”)
Set UIdoc = WorkSpace.CurrentDocument
'Copy the email address from cell C19 into the TO: field in Lotus Notes
'Note: Addresses in this cell should be separated by a semicolon
Recipient = Sheets(“Sheet1”).Range(“C19”).Value
Call UIdoc.FieldSetText(“EnterSendTo”, Recipient)
'Copy the email address from cell C20 into the CC: field in Lotus Notes
'Note: Addresses in this cell should be separated by a semicolon
ccRecipient = Sheets(“Sheet1”).Range(“C20”).Value
Call UIdoc.FieldSetText(“EnterCopyTo”, ccRecipient)
'Copy the email address from cell C21 into the BCC: field in Lotus Notes
'Note: Addresses in this cell should be separated by a semicolon
bccRecipient = Sheets(“Sheet1”).Range(“C21”).Value
Call UIdoc.FieldSetText(“EnterBlindCopyTo”, bccRecipient)
Call UIdoc.FieldSetText(“EnterReplyTo”, “testingemail@notworking.com”)
^^^^^^^^^^^
This is what I can’t figure out.
Any help is appreciated.
Thanks in advance.