C
chrismahoney
Hi
I'm moving an old Outlook form across to InfoPath, and I'm trying to
figure out how to open the form from Access. This is the current code:
Dim objOutlook As Outlook.Application
Dim nsOutlook As Outlook.NameSpace
Dim folTask As Object
Dim tskPhoto As Outlook.MailItem
Set objOutlook = New Outlook.Application
Set nsOutlook = objOutlook.GetNamespace("MAPI")
Set folTask = nsOutlook.GetDefaultFolder(olFolderInbox)
Set tskPhoto = folTask.Items.Add("IPM.Note.library Photos")
With tskPhoto
.UserProperties.Item("FilmNumber").Value = filmNumber
.UserProperties.Item("StaffNumber").Value = StaffNumber
.Subject = "Please enter the relevant information for each photo in
the 'Photos' form"
.Body = " "
.ReminderSet = True
.ReminderTime = DateAdd("d", 6, Date) & " 12:00:00"
End With
Call tskPhoto.Recipients.Add(StaffName)
Call tskPhoto.Send
I didn't write this code, but it appears to be passing two variables
(FilmNumber and StaffNumber) into the Outlook form. I've created a
couple of fields in InfoPath for these variables to go into, but I have
no idea how to modify the above code to use InfoPath instead of
Outlook.
Help please
Thanks
Chris
I'm moving an old Outlook form across to InfoPath, and I'm trying to
figure out how to open the form from Access. This is the current code:
Dim objOutlook As Outlook.Application
Dim nsOutlook As Outlook.NameSpace
Dim folTask As Object
Dim tskPhoto As Outlook.MailItem
Set objOutlook = New Outlook.Application
Set nsOutlook = objOutlook.GetNamespace("MAPI")
Set folTask = nsOutlook.GetDefaultFolder(olFolderInbox)
Set tskPhoto = folTask.Items.Add("IPM.Note.library Photos")
With tskPhoto
.UserProperties.Item("FilmNumber").Value = filmNumber
.UserProperties.Item("StaffNumber").Value = StaffNumber
.Subject = "Please enter the relevant information for each photo in
the 'Photos' form"
.Body = " "
.ReminderSet = True
.ReminderTime = DateAdd("d", 6, Date) & " 12:00:00"
End With
Call tskPhoto.Recipients.Add(StaffName)
Call tskPhoto.Send
I didn't write this code, but it appears to be passing two variables
(FilmNumber and StaffNumber) into the Outlook form. I've created a
couple of fields in InfoPath for these variables to go into, but I have
no idea how to modify the above code to use InfoPath instead of
Outlook.
Help please
Thanks
Chris