Hi there,

I am not the bet in Access, I will admit. But need a function to open up a MS Outlook template (.oft file) within Access. Anyone help with quick steps on how to do this, It would be greatly apprciated.

Recommended Answers

All 3 Replies

You can't.
If you are trying to use Access as a datasource for Outlook you can, but there are limitations. You would have to use Outlook VBA Design controls.

Sounds like you are trying to use an ACCESS form to generate OL2000 appointments/etc.

If that is the case you may want to design a form in OUTLOOK modifying an existing template, and pull the data from Access. Then it becomes an Outlook VBA application using automation, events and rules

Hi there,

I am not the best in Access, I will admit. But need a function to open up a MS Outlook template (.oft file) within Access. Anyone help with quick steps on how to do this, It would be greatly apprciated.

To answer EXACTLY what you asked - here it is
'---------------------------------------------------
Private Sub Command1_Click()
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItemFromTemplate("C:\Program Files\Microsoft Office\Templates\APPT2.oft")
myItem.Display
End Sub
'--------------------------------------------------
1: Create a Command1 button on ACCESS Form
2: Place Code in EVENT HANDLE

This Code does this
a: Create an OUTLOOK Object
b: Create an Object Item from Template (your existing template in the directory you saved it to.)
c: Displays your item

APPT2 is the name of the custom template, change it to what yours is named


--------Thread End ----------
aka Kegtapper

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.