Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening a custom outlook form from access

Status
Not open for further replies.

JazzMan2

Programmer
Jul 1, 1999
9
US
Hi,<br>
<br>
I am trying to open a custom form that is located in the organizational library in Outlook,<br>
and I need to open it from Access. <br>
<br>
If anyone can help I would appreciate it.<br>
<br>
<br>
Thanks <br>
JazzMan
 
I just wanted to let you guys, <br>
know that I figured it out. <br>
<br>
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.<br>
<br>
<br>
Private Sub cmdtimesheet_Click()<br>
On Error GoTo Err_cmdtimesheet<br>
<br>
Dim ol As Outlook.Application<br>
Dim ns As Outlook.NameSpace<br>
Dim NewTimeSheet As Object<br>
Dim fldr As Outlook.MAPIFolder<br>
<br>
Set ol = New Outlook.Application<br>
Set ns = ol.GetNamespace("MAPI")<br>
Set fldr = ns.GetDefaultFolder(olFolderOutbox)<br>
Set NewTimeSheet = fldr.items.Add _("IPM.Document.Excel.Sheet.8.EmployeeTimeSheet")<br>
NewTimeSheet.Display<br>
<br>
Exit_cmdtimesheet:<br>
Exit Sub<br>
<br>
Err_cmdtimesheet:<br>
MsgBox Err.Description<br>
Resume Exit_cmdtimesheet<br>
<br>
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top