programmatically turn off autopreview

  • Thread starter Thread starter Omar
  • Start date Start date
O

Omar

Does anyone know how to turn off the autopreview feature for a given
folder programatically? it seems that when i wrote an add-in to read
the email from my imap folder, it also turned on autopreview. is there
a registry key or something nice that can be done?

omar
 
You can get the menu item that controls that as a CommandBarButton
object and call it's Execute method.
 
Ken Slovak - said:
You can get the menu item that controls that as a CommandBarButton
object and call it's Execute method.

What I'd want to do is

View | Current view | Customize current view... | Other Settings ... |
Select "No Autopreview"

You're saying there's a way to execute this string of events with a
CommandBarButton? I was looking at the CommandBarButton in outlook
spy, and got to the menu and to Customize current view... but i'm not
sure what i can execute on this.

omar
 
Way too complicated. View, AutoPreview should do it for you.

Dim oCB As Office.CommandBar
Dim oCBB As Office.CommandBarPopup
Dim oCBB1 As Office.CommandBarButton

Set oCB = Application.ActiveExplorer.CommandBars("Menu Bar")
Set oCBB = oCB.Controls("View")
Set oCBB1 = oCBB.Controls("AutoPreview")
If oCBB1.State = msoButtonUp Then
oCBB1.Execute
End If




Omar said:
"Ken Slovak - [MVP - Outlook]" <[email protected]> wrote in message
You can get the menu item that controls that as a CommandBarButton
object and call it's Execute method.

What I'd want to do is

View | Current view | Customize current view... | Other Settings ... |
Select "No Autopreview"

You're saying there's a way to execute this string of events with a
CommandBarButton? I was looking at the CommandBarButton in outlook
spy, and got to the menu and to Customize current view... but i'm not
sure what i can execute on this.

omar
 
Back
Top