The code I have so far is:
XDocument.DOM.setProperty "SelectionNamespaces", "xmlns:xsi=""
xmlns:my=""
xmlns:xd=""
'</namespacesDefinition>
Sub CTRL21_5_OnClick(eventObj)
Dim objOutlook
Dim itmAppt
Dim time
Dim name
Set objOutlook = CreateObject("Outlook.Application")
Set itmAppt = objOutlook.CreateItem(1)
Set time = XDocument.DOM.selectSingleNode("/my:myFields/my:contact-data")
Set name = XDocument.DOM.selectSingleNode("/my:myFields/my:NPI-num")
itmAppt.Subject = name.text
itmAppt.Start = time.text
itmAppt.Duration = 15
itmAppt.AllDayEvent = False
itmAppt.ReminderSet = True
itmAppt.ReminderMinutesBeforeStart = 15
itmAppt.Save
End Sub
This works well when by itself and adds an appointment to my calendar. I am trying to set up so that same button does this and submits the data to a SharePoint library. What I have found is that if I set up a rule on the same button the code doesn't work. To work around that I was trying write code that would change the contents of a textbox within the form to "1" and then set up a rule on the textbox that when the contents became "1" it would submit the data.