467,169 Members | 995 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,169 developers. It's quick & easy.

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.
__________________________________________________ ___________
Expand|Select|Wrap|Line Numbers
  1. Function CreateNotesMeeting()
  2. On Error GoTo ErrorHandler
  3. Dim objNotesSession As Object
  4. Dim objNotesDbDirectory As Object
  5. Dim objNotesDatabase As Object
  6. Dim objNotesDocument As Object
  7. Dim objNotesRichTextItem As Object
  8. Dim StrBody As String
  9. Dim Username As String
  10. Dim StartTime As String
  11. Dim EndTime As String
  12. Dim arrRequiredAttendeeName As String
  13. Dim arrRequiredAttendeeNameAndEmail As String
  14.  
  15. Username = GetCurrentUserName()
  16. StrBody = "Testing Invitation"
  17. StartTime = "3/22/08 01:30:00 PM"
  18. EndTime = "03/22/08 02:30:00 PM"
  19.  
  20. AttendeeNameAndEmail = ""&Username & "/PGV/JD"
  21.  
  22. Set objNotesSession = CreateObject("Notes.NotesSession")
  23. Set objNotesDatabase = objNotesSession.GETDATABASE("ServerName", "MAIL\" &Username & ".NSF")
  24.  
  25. If Not objNotesDatabase.ISOPEN Then Exit Function
  26. Set objNotesDocument = objNotesDatabase.CREATEDOCUMENT
  27.  
  28. Set objNotesDtFrom = objNotesSession.CREATEDATETIME(StartTime)
  29. Set objNotesDtTo = objNotesSession.CREATEDATETIME(EndTime)
  30. Set objNotesRichTextItem = objNotesDocument.CREATERICHTEXTITEM("Body")
  31.  
  32.  
  33. Call objNotesDocument.REPLACEITEMVALUE("AppointmentType", "3")
  34. Call objNotesDocument.REPLACEITEMVALUE("Form", "Appointment")
  35. Call objNotesDocument.REPLACEITEMVALUE("Subject", "Another Test - Counter")
  36. Call objNotesDocument.REPLACEITEMVALUE("Location", "Test")
  37. Call objNotesDocument.REPLACEITEMVALUE("Room", "Test")
  38. Call objNotesDocument.REPLACEITEMVALUE("Body", StrBody)
  39. Call objNotesRichTextItem.EMBEDOBJECT(1454, "", "C:\Test\Test.snp", "")
  40. Call objNotesDocument.REPLACEITEMVALUE("From", objNotesSession.Username)
  41. Call objNotesDocument.REPLACEITEMVALUE("Chair", objNotesSession.Username)
  42. Call objNotesDocument.REPLACEITEMVALUE("$Alarm", 1)
  43. Call objNotesDocument.REPLACEITEMVALUE("$AlarmOffset", -30)
  44. Call objNotesDocument.REPLACEITEMVALUE("CalendarDateTime", objNotesDtFrom.LSLOCALTIME)
  45. Call objNotesDocument.REPLACEITEMVALUE("STARTDATETIME", objNotesDtFrom.LSLOCALTIME)
  46. Call objNotesDocument.REPLACEITEMVALUE("EndDateTime", objNotesDtTo.LSLOCALTIME)
  47. Call objNotesDocument.APPENDITEMVALUE("RequiredAttendees", AttendeeNameAndEmail)
  48. Call objNotesDocument.APPENDITEMVALUE("AltRequiredNames", AttendeeNameAndEmail)
  49. Call objNotesDocument.APPENDITEMVALUE("INetRequiredNames", AttendeeNameAndEmail)
  50. Call objNotesDocument.APPENDITEMVALUE("xSendTo", AttendeeNameAndEmail)
  51. Call objNotesDocument.APPENDITEMVALUE("NoticeType", "I")
  52. Call objNotesDocument.REPLACEITEMVALUE("$UpdatedBy", objNotesSession.Username)
  53. Call objNotesDocument.REPLACEITEMVALUE("_ViewIcon", 158)
  54.  
  55. Call objNotesDocument.Send(False, AttendeeNameAndEmail)
  56. Call objNotesDocument.Save(True, True)
  57.  
  58. Set objNotesRichTextItem = Nothing
  59. Set objNotesDtTo = Nothing
  60. Set objNotesDtFrom = Nothing
  61. Set objNotesDocument = Nothing
  62. Set objNotesDatabase = Nothing
  63. Set objNotesDbDirectory = Nothing
  64. Set objNotesSession = Nothing
  65.  
  66. Exit Function
  67.  
  68. ErrorHandler:
  69.     MsgBox Err.Number & " - " & Err.Description
  70.  
  71. End Function
__________________________________________________ ________________
Mar 21 '08 #1
  • viewed: 3764
Share:
1 Reply
I am really disappointed that I absolutely got no replies to my request.. :-(
Mar 26 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by info@xmlphilly.org | last post: by
reply views Thread by U S Contractors Offering Service A Non-profit | last post: by
ddtpmyra
2 posts views Thread by ddtpmyra | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.