outlook options dialog

G

gbgkille69

I'm looking for a way to bring up the Outlook options dialog from
within a vbs script or commandline options.

just like this is possible for control panel options:
rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,4

is it also possible to choose a tab: Preferences, mail setup, mail
format,.. at startup?.
 
S

Sue Mosher [MVP-Outlook]

YOu can run any menu or toolbar command with CommandBars methods. SEe http://www.outlookcode.com/d/tips/commandbarfun.htm. You would have to use a SendKeys kludge, though, to try to show a particular tab.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

gbgkille69

Thanks for the help, I've run in a new problem now. I tried the example
on that page but it doesn't seem too accept ActiveInspector or
GetInpsector.

My code (called with cscript.exe tets.bvs):

ption Explicit


Dim objOutlook, objName, objCBm, objPop, objCtl

Set objOutlook = CreateObject("Outlook.Application") ', "localhost")
'Set objName = objOutlook.GetNamespace("MAPI")


'Set objCB = objOutlook.ActiveInspector.CommandBars("Menu Bar")
'Set objInsp = objOutlook.GetInspector
Set objCB = objCB.CommandBars("Menu Bar")
'Set objPop = objCB.Controls("Tools")
'Set objCtl = objPop.Controls("Options...")
'objCtl.Execute

Set objInsp = objOutlook.GetInspector
Set colCB = objInsp.CommandBars
Set objCBB = colCB.FindControl(, 522)
objCBB.Execute

'objName.logoff
 
S

Sue Mosher [MVP-Outlook]

ActiveInspector is the active window (if any) showing an individual item. ActiveExplorer is the active window (if any) showing the Outlook folders, etc., what you would consider the main window. That's the one you need to be using to access Tools | OPtions.

Also note: The newsgroup interface you are using apparently does not quote earlier messages in the thread, making your latest message so short on detail that you risk not getting the answer you're looking for. Please take the time to quote the original message.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top