J
joshnya2
I have a custom form that has a [TextBox9] where I want the user to
input the current date ex: 06/01/2007
On click the form will send out a bunch of meeting requests but I am
having a hard time getting a customized date to work.
If I want a meeting for the date the person entered + 1 day from 7:00
AM to 4:00 PM how would I do that?
The following code works for hard coding a date into the macro:
Set objOL = CreateObject("Outlook.Application")
Set objAppt = objOL.CreateItem(olAppointmentItem)
With objAppt
.Subject = "My Test Appointment"
.start = "06/01/2007 7:00 AM"
.End = "06/01/2007 4:00 PM"
' make it a meeting request
.MeetingStatus = olMeeting
.RequiredAttendees = [TextBox1]
.Send
End With
What I am trying to do is at the start and end do something like:
Again, TextBox9 is the mm/dd/yyy string pulled from that field on my
form.
..start = [TextBox9] + 1 & "7:00 AM"
..End = [TextBox9] + 1 & "4:00 PM"
So if the user entered the date "06/02/2007" into my field associated
with TextBox9 a meeting would be generated for 06/03/2007 from 7am to
4pm.
hewp..
input the current date ex: 06/01/2007
On click the form will send out a bunch of meeting requests but I am
having a hard time getting a customized date to work.
If I want a meeting for the date the person entered + 1 day from 7:00
AM to 4:00 PM how would I do that?
The following code works for hard coding a date into the macro:
Set objOL = CreateObject("Outlook.Application")
Set objAppt = objOL.CreateItem(olAppointmentItem)
With objAppt
.Subject = "My Test Appointment"
.start = "06/01/2007 7:00 AM"
.End = "06/01/2007 4:00 PM"
' make it a meeting request
.MeetingStatus = olMeeting
.RequiredAttendees = [TextBox1]
.Send
End With
What I am trying to do is at the start and end do something like:
Again, TextBox9 is the mm/dd/yyy string pulled from that field on my
form.
..start = [TextBox9] + 1 & "7:00 AM"
..End = [TextBox9] + 1 & "4:00 PM"
So if the user entered the date "06/02/2007" into my field associated
with TextBox9 a meeting would be generated for 06/03/2007 from 7am to
4pm.
hewp..