none
.Start within AppointmentItem

    Question

  • Hello,

    I am creating a form within word, using a macro button to send the form to my calendar as an appointment. I have been able to get the calendar to work but I can not get the start date to appear as what the user has typed in. In the text form field I have set it as 'date' and set the format to dd/mm/yy. I have also set the time label as a text form field - using 'date' and hh:mm format.

    Dim olApp As Outlook.Application
    Dim myItem As AppointmentItem


    Set olApp = New Outlook.Application
    Set myItem = olApp.CreateItem(olAppointmentItem)

    If ActiveDocument.FormFields("meetingdate").TextInput <> "" Then
     meetingdate = ActiveDocument.FormFields("meetingdate").Result
    End If

    If ActiveDocument.FormFields("starttime").TextInput <> "" Then
     starttime = ActiveDocument.FormFields("starttime").Result
    End If


    With myItem
     .Start = ?

              

    .ResponseRequested = False
    .Subject = itemrequired
    .Duration = "30"
    .ReminderSet = True

    .save

    thanks.


    • Edited by Yellow4life Tuesday, February 16, 2016 12:59 PM edit code
    • Moved by Just KarlModerator Wednesday, February 17, 2016 8:29 PM Looking for the correct forum.
    Tuesday, February 16, 2016 12:25 PM

Answers

All replies