VBA

Moderators: PavlinII
Number of threads: 1581
Number of posts: 2954

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Custom Appointment Macro locks rest of Outlook when run Posted by guitar_adam on 8 Dec 2009 at 9:39 AM
I've created a basic macro and assigned it to a toolbar button. The macro opens the new calendar appointment window with a default template (I know there are other ways to do this via personal and organizational templates etc. but for a handful of users with limited access rights this is the way we want to go). The problem is that when the macro is activated the appointment window stays on top and locks out everything else in outlook - so users cannot refer to other emails or calendar entries (which they need to do) unless the new appointment window is closed:

Sub Engineers_Template()


Dim oApp As Outlook.Application
Dim oMsg As Outlook.AppointmentItem


Set oApp = New Outlook.Application

Set oMsg = oApp.CreateItemFromTemplate("H:\Install Team Job Template - TEST\Install Team - New Job Details.oft")

If Not oMsg Is Nothing Then
oMsg.Display vbModal
Else
MsgBox "Template Not Found. Contact I.T team"
End If

End Sub



Any ideas on how I make it so the rest of outlook isn't locked when the macro is running?
Thanks




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.