View Single Post
  #3  
Old March 26th 08, 10:03 PM posted to microsoft.public.outlook.program_vba
garfong
external usenet poster
 
Posts: 2
Default Button To Open Template - Outlook 2007

Wow! You're good!

That worked like a charm. Thanks a million!

"Sue Mosher [MVP-Outlook]" wrote:

Write a macro that calls the Application.CreateItemFromTemplate method:

Sub MakeItem()
Set newItem = Application.CreateItemFromTemplate("c:\your path\open test.oft")
newItem.Display
Set newItem = Nothing
End Sub

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"garfong" wrote in message ...
I need to create a button on the toolbar that will open a template stored in
the office\templates directory. I tried creating a button that hyperlinked to
the template but Outlook has decided such a move is dangerous and once the
user gets past all the warnings, the template comes up blank because outlook
has blocked all the functionality.

Any ideas how I can use VBA to get past the annoying prompts and get the
button to open the template directly? In effect, the button would recreate
the steps of going to File New Choose Form Look In: User Templates In
File System Open test.otf


Ads