Link to home
Start Free TrialLog in
Avatar of colishau1
colishau1

asked on

Failure to Interpret Received Meeting

Hi there,

I am developing a component to automate the sending of mail and meetings with VB and Notes 5.
With the kind help of Qwaletee from:
https://www.experts-exchange.com/questions/20704065/Send-Appointment-Meeting-with-vb.html
I successfully completed the functionality for sending both.

My problem with the code below is that the notes client that receives the mail does not
recognise it as a meeting or calendar entry. I am inexperienced with this but it could
possibly be due to problems inviting recipients.

Below I have included the meeting code and the (shortened) mail that is received.
I would appreciate any help you can offer,
Thank You,
Colin.
 
/****************************Meeting Code***********************/
Dim session As Object
Dim db As Object
Dim doc As Object
Dim startDateTime As Object
Dim endDateTime As Object
Dim DbLocation As String    

    Set session = CreateObject("Notes.NotesSession")
    DbLocation = session.GETENVIRONMENTSTRING("MailFile", True)
    Set db = session.GETDATABASE("", DbLocation)
    Set doc = db.CREATEDOCUMENT
    Set startDateTime = session.CREATEDATETIME(txtAppStartDate.Text & " " & txtAppStartTime.Text)
    Set endDateTime = session.CREATEDATETIME(txtAppStartDate.Text & " " & txtAppEndTime.Text)
   
    'Set doc type
    Call doc.replaceitemvalue("Form", "Appointment")
    Call doc.replaceitemvalue("AppointmentType", "3")
    '0: APPOINTMENT 1: ANNIVERSARY 2: ALL DAY 3 = MEETING 4 = REMINDER
    'Set reminder alarm
    Call doc.replaceitemvalue("$Alarm", 1)
    Call doc.replaceitemvalue("$AlarmOffset", 0)
    'Set Times and Dates
    Call doc.replaceitemvalue("CalendarDateTime", startDateTime.LSLOCALTIME)
    Call doc.replaceitemvalue("StartDateTime", startDateTime.LSLOCALTIME)
    Call doc.replaceitemvalue("EndDateTime", endDateTime.LSLOCALTIME)
    'Set Main Doc Attributes
    Call doc.replaceitemvalue("Alarms", "1")
    Call doc.replaceitemvalue("Chair", session.USERNAME)
    Call doc.replaceitemvalue("Location", txtAppLocation.Text)
    Call doc.replaceitemvalue("From", session.USERNAME)
    Call doc.replaceitemvalue("Subject", txtAppSubject.Text)
    Call doc.replaceitemvalue("SendTo", Split(txtAppRecipient.Text, ","))
    Call doc.replaceitemvalue("Body", txtAppBody.Text)
    Call doc.replaceitemvalue("ExcludefromView", "D")
    Call doc.replaceitemvalue("RequiredAttendees", txtInvite.Text)

    doc.Save True, True
    doc.Send False
    doc.PUTINFOLDER "($Alarms)"

/*************************Received Mail*******************************/

Calendar Entry:                                                          
  Meeting                                                                  
                                                                           
  Subject:                                                                  
           Setting up a Meeting            
                                        Location:                          
                                                       The Board Room      
  Begins:                                                                  
           22/08/2003                                                      
                                        Entry type:                        
                                                       Meeting              
  Ends:                                                                    
           22/08/2003                                                      
                                        |----------------|                    
                                        | [ ] Repeats  |                    
                                        |----------------|                    
  Chair:                                                                    
           notes1                                                          
                                                                           
 Invitations already sent                                                  
                                                                        To:
               notes2@hotmail.com                                            
                                                                        cc:
                                                                           
  |----------------|                                                        
  | [ ] Pencil In |                                                        
  |----------------|                                                        
                  Time will appear free to others.                          
  |---------------------|                                                      
  | [ ] Mark Private |                                                      
  |---------------------|                                                      
                  Others cannot see any details about this event.          
  |------------------|                                                        
  | [X] Notify me |                                                        
  |------------------|                                                        
                  Have Notes notify you before the event.                  
  Categorize:                                                              
                     
Description:
this is the description/body of the mail

/****************************************END***************************/
Avatar of Bozzie4
Bozzie4
Flag of Belgium image

Are you sending this meeting to Notes users, or to internet addresses ?

If you do send them via smtp, to internet addresses, you may loose the 'Appointment' form.
Try sending them to Notes users first

Call doc.replaceitemvalue("SendTo", "A NotesUser/YourOrganization")

cheers,

Tom
ASKER CERTIFIED SOLUTION
Avatar of HemanthaKumar
HemanthaKumar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of qwaletee
qwaletee

Definitely missing a few fields from the accepted solution.  Here's the original list of fields...

Form
$Alarm
$AlarmOffset", 0
startDateTime
endDateTime
calendarDateTime
Subject
startTime
appointmentType
Alarms
startDate
endDate
endTime
SendTo
Avatar of colishau1

ASKER

Thanks for your help guys.