Appointment button on contact form

  • Thread starter Kevin McLear via OfficeKB.com
  • Start date
K

Kevin McLear via OfficeKB.com

I have a command button on my contact form to start an appointment from the input data of the subject and date and time.

Sub cmdSetAppt_Click
Set myItem = Application.CreateItem(1)
myItem.Subject = Item.UserProperties("txtSubject")
myItem.Start= Item.UserProperties("txtDateAndTime")
myItem.Display
myItem.Save

End Sub

Error is this:
Type mismatch: Unable to coerce parameter value. Outlook cannot translate your string. Although I can put a Subject in like this : myItem.Subject = "Student Grades" but I cannot have it be pulled from the original form. The fields are labeled txtSubject and txtDateAndTime.

Can someone help me?

Also how do I change the destination to a public folder to have it work for a public calandar in exchange?
 
Top