LotusNotes 6 Meeting Invitation Generated in VBA - Cannot Perform Calendar Operation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sandeeprmenon
    New Member
    • Mar 2008
    • 2

    LotusNotes 6 Meeting Invitation Generated in VBA - Cannot Perform Calendar Operation

    Combining bit & peices from different discussion forums, I created this program (see below) to send meeting invitation from Lotus Notes using VBA. Program successfully sends the invitation to all required parties but throws the following error when I try to process meeting counters or if I try to cancel the meeting from my calendar.

    "Unable to send mail; multiple matches found in Name & Address Book(s)"

    I removed all entries in my local address book to avoid any conflicts. Interesting I am able to perform mail functions with the calendar entry (like send memo to invities).

    The bottom line is that I can't perform calendar functions once I send out the invitations.

    Can someone help with figure out why this is happening? I would really appreciate your help.
    _______________ _______________ _______________ _______________ _
    [CODE=vb]Function CreateNotesMeet ing()
    On Error GoTo ErrorHandler
    Dim objNotesSession As Object
    Dim objNotesDbDirec tory As Object
    Dim objNotesDatabas e As Object
    Dim objNotesDocumen t As Object
    Dim objNotesRichTex tItem As Object
    Dim StrBody As String
    Dim Username As String
    Dim StartTime As String
    Dim EndTime As String
    Dim arrRequiredAtte ndeeName As String
    Dim arrRequiredAtte ndeeNameAndEmai l As String

    Username = GetCurrentUserN ame()
    StrBody = "Testing Invitation"
    StartTime = "3/22/08 01:30:00 PM"
    EndTime = "03/22/08 02:30:00 PM"

    AttendeeNameAnd Email = ""&Username & "/PGV/JD"

    Set objNotesSession = CreateObject("N otes.NotesSessi on")
    Set objNotesDatabas e = objNotesSession .GETDATABASE("S erverName", "MAIL\" &Username & ".NSF")

    If Not objNotesDatabas e.ISOPEN Then Exit Function
    Set objNotesDocumen t = objNotesDatabas e.CREATEDOCUMEN T

    Set objNotesDtFrom = objNotesSession .CREATEDATETIME (StartTime)
    Set objNotesDtTo = objNotesSession .CREATEDATETIME (EndTime)
    Set objNotesRichTex tItem = objNotesDocumen t.CREATERICHTEX TITEM("Body")


    Call objNotesDocumen t.REPLACEITEMVA LUE("Appointmen tType", "3")
    Call objNotesDocumen t.REPLACEITEMVA LUE("Form", "Appointmen t")
    Call objNotesDocumen t.REPLACEITEMVA LUE("Subject", "Another Test - Counter")
    Call objNotesDocumen t.REPLACEITEMVA LUE("Location", "Test")
    Call objNotesDocumen t.REPLACEITEMVA LUE("Room", "Test")
    Call objNotesDocumen t.REPLACEITEMVA LUE("Body", StrBody)
    Call objNotesRichTex tItem.EMBEDOBJE CT(1454, "", "C:\Test\Test.s np", "")
    Call objNotesDocumen t.REPLACEITEMVA LUE("From", objNotesSession .Username)
    Call objNotesDocumen t.REPLACEITEMVA LUE("Chair", objNotesSession .Username)
    Call objNotesDocumen t.REPLACEITEMVA LUE("$Alarm", 1)
    Call objNotesDocumen t.REPLACEITEMVA LUE("$AlarmOffs et", -30)
    Call objNotesDocumen t.REPLACEITEMVA LUE("CalendarDa teTime", objNotesDtFrom. LSLOCALTIME)
    Call objNotesDocumen t.REPLACEITEMVA LUE("STARTDATET IME", objNotesDtFrom. LSLOCALTIME)
    Call objNotesDocumen t.REPLACEITEMVA LUE("EndDateTim e", objNotesDtTo.LS LOCALTIME)
    Call objNotesDocumen t.APPENDITEMVAL UE("RequiredAtt endees", AttendeeNameAnd Email)
    Call objNotesDocumen t.APPENDITEMVAL UE("AltRequired Names", AttendeeNameAnd Email)
    Call objNotesDocumen t.APPENDITEMVAL UE("INetRequire dNames", AttendeeNameAnd Email)
    Call objNotesDocumen t.APPENDITEMVAL UE("xSendTo", AttendeeNameAnd Email)
    Call objNotesDocumen t.APPENDITEMVAL UE("NoticeType" , "I")
    Call objNotesDocumen t.REPLACEITEMVA LUE("$UpdatedBy ", objNotesSession .Username)
    Call objNotesDocumen t.REPLACEITEMVA LUE("_ViewIcon" , 158)

    Call objNotesDocumen t.Send(False, AttendeeNameAnd Email)
    Call objNotesDocumen t.Save(True, True)

    Set objNotesRichTex tItem = Nothing
    Set objNotesDtTo = Nothing
    Set objNotesDtFrom = Nothing
    Set objNotesDocumen t = Nothing
    Set objNotesDatabas e = Nothing
    Set objNotesDbDirec tory = Nothing
    Set objNotesSession = Nothing

    Exit Function

    ErrorHandler:
    MsgBox Err.Number & " - " & Err.Description

    End Function[/CODE]
    _______________ _______________ _______________ _______________ ______
  • sandeeprmenon
    New Member
    • Mar 2008
    • 2

    #2
    I am really disappointed that I absolutely got no replies to my request.. :-(

    Comment

    Working...