opening a custom outlook form from access
opening a custom outlook form from access
(OP)
Hi,
I am trying to open a custom form that is located in the organizational library in Outlook,
and I need to open it from Access.
If anyone can help I would appreciate it.
Thanks
JazzMan
I am trying to open a custom form that is located in the organizational library in Outlook,
and I need to open it from Access.
If anyone can help I would appreciate it.
Thanks
JazzMan
RE: opening a custom outlook form from access
know that I figured it out.
It took way too long for this little bit of code, but here it is for any of you who are having the same problem.
Private Sub cmdtimesheet_Click()
On Error GoTo Err_cmdtimesheet
Dim ol As Outlook.Application
Dim ns As Outlook.NameSpace
Dim NewTimeSheet As Object
Dim fldr As Outlook.MAPIFolder
Set ol = New Outlook.Application
Set ns = ol.GetNamespace("MAPI")
Set fldr = ns.GetDefaultFolder(olFolderOutbox)
Set NewTimeSheet = fldr.items.Add _("IPM.Document.Excel.Sheet.8.EmployeeTimeSheet")
NewTimeSheet.Display
Exit_cmdtimesheet:
Exit Sub
Err_cmdtimesheet:
MsgBox Err.Description
Resume Exit_cmdtimesheet
End Sub