Microsoft
Software
Hardware
Network
Question : I would like to prevent two or more instances of outlook being open at same time
How do I prevent multiple instances of outlook (same profile) being open at same time - sometimes impatient users click icon several times nothing I say will prevent that so what can I do?
Thank you
David
Answer : I would like to prevent two or more instances of outlook being open at same time
I think either you sign some code yourself, or your users contend with "this session has macros - enable them?" message each time..
Perhaps modifying their shortcut to point to OLSession.vbs...
'OLSession.vbs
Const olFolderInbox = 6
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery _
("Select * From Win32_Process Where Name = 'outlook.exe'")
If colItems.Count = 0 Then
Set objOutlook = CreateObject("Outlook.Appl
ication")
Set objNamespace = objOutlook.GetNamespace("M
API")
Set objFolder = objNamespace.GetDefaultFol
der(olFold
erInbox)
objFolder.Display
Else
MsgBox "Please be patient, Outlook is still loading...", vbOKOnly, "What's the hurry?"
wscript.quit
End If
Set objFolder = Nothing
Set objNamespace = Nothing
Set objOutlook = Nothing
wscript.quit
Random Solutions
Changing the source for a query
On timer event passes it's own time
Print issues in Reporting Services
Load progress bar C#, asp.net
The Certification Authority Service has not been started.
Ghost32
What does an MFC resource file with texts of more than one language look like?
PhysicalDrive0 in VBNET
VBS, SQL, Access, ODBC - Problems with an Insert Statement
How to delete a row based on the value of a cell? (macro)