Outlook::ExplorerEvents::SelectionChange()

  • Thread starter Thread starter John Erickson
  • Start date Start date
Status
Not open for further replies.
J

John Erickson

I'm adding a custom form region for Outlook 2007 and it's working great.

Since Outlook 2003 and below doesn't support form regions I am planning on

popping up a modal dialog box to accomplish the same thing that my custom

form region does for 2007. I was hoping to use the

Outlook::ExplorerEvents::SelectionChange() event to pop the modal dialog box.

However, at the time this event is triggered, the reading pane hasn't been

displayed yet. It's empty. I can't seem to find an event that fits that

timeframe. I want the reading pane to be done painting so that my user can

see it's contents while he is answering the question in my dialog box. My

alternative is to make the popup modeless, but I'd prefer not to do that. The

modeless dialog(s) may get lost and forgotten behind some other window and

I'd have to deal with multiple occurences of them, etc... Is there an event

I'm missing that would trigger after the reading pane is done displaying the

contents of a new selection?
 
You can use a timer: activate thetimer in the SelectionChange event handler,

then handle the Timer event later when it fires up.

Dmitry Streblechenko (MVP)

-

"John Erickson" <JohnErickson> wrote in message

news:88A87F4D-10E2-4A43-97C9-A0426EB207FB@microsoft.com...
> I'm adding a custom form region for Outlook 2007 and it's working great.
> Since Outlook 2003 and below doesn't support form regions I am planning on
> popping up a modal dialog box to accomplish the same thing that my custom
> form region does for 2007. I was hoping to use the
> Outlook::ExplorerEvents::SelectionChange() event to pop the modal dialog
> box.
> However, at the time this event is triggered, the reading pane hasn't been
> displayed yet. It's empty. I can't seem to find an event that fits that
> timeframe. I want the reading pane to be done painting so that my user can
> see it's contents while he is answering the question in my dialog box. My
> alternative is to make the popup modeless, but I'd prefer not to do that.
> The
> modeless dialog(s) may get lost and forgotten behind some other window and
> I'd have to deal with multiple occurences of them, etc... Is there an
> event
> I'm missing that would trigger after the reading pane is done displaying
> the
> contents of a new selection?
 
If you're referring to SetTimer and then reacting to the WM_TIMER message,

then I would have to sublass Outlook's window to catch the message.

Subclassing their window is something I'm trying to avoid. Not because it's

difficult, but because I want to be as friendly to Outlook as possible. Plus

I would still have issues with what do I do if another selection change

occurs. It could be possible to make another selection before the timer went

off. Dealing with all that may be more trouble than just making it modeless.

I have to deal with selection changes while I'm modeless, but I don't have to

deal with the timer and the subclassing.

"Dmitry Streblechenko" wrote:


> You can use a timer: activate thetimer in the SelectionChange event handler,
> then handle the Timer event later when it fires up.

> > Dmitry Streblechenko (MVP)
>

>

>

> -
> "John Erickson" <JohnErickson> wrote in message
> news:88A87F4D-10E2-4A43-97C9-A0426EB207FB@microsoft.com...
> > I'm adding a custom form region for Outlook 2007 and it's working great.
> > Since Outlook 2003 and below doesn't support form regions I am planning on
> > popping up a modal dialog box to accomplish the same thing that my custom
> > form region does for 2007. I was hoping to use the
> > Outlook::ExplorerEvents::SelectionChange() event to pop the modal dialog
> > box.
> > However, at the time this event is triggered, the reading pane hasn't been
> > displayed yet. It's empty. I can't seem to find an event that fits that
> > timeframe. I want the reading pane to be done painting so that my user can
> > see it's contents while he is answering the question in my dialog box. My
> > alternative is to make the popup modeless, but I'd prefer not to do that.
> > The
> > modeless dialog(s) may get lost and forgotten behind some other window and
> > I'd have to deal with multiple occurences of them, etc... Is there an
> > event
> > I'm missing that would trigger after the reading pane is done displaying
> > the
> > contents of a new selection?


>
 
Just a system timer, set that and when it fires you have the event to handle

displaying your dialog. As long as the timer runs on the main thread there

should be no problems.

"John Erickson" <JohnErickson> wrote in message

news:9F553C9E-EE2B-450A-9962-E02137222E63@microsoft.com...
> If you're referring to SetTimer and then reacting to the WM_TIMER message,
> then I would have to sublass Outlook's window to catch the message.
> Subclassing their window is something I'm trying to avoid. Not because
> it's
> difficult, but because I want to be as friendly to Outlook as possible.
> Plus
> I would still have issues with what do I do if another selection change
> occurs. It could be possible to make another selection before the timer
> went
> off. Dealing with all that may be more trouble than just making it
> modeless.
> I have to deal with selection changes while I'm modeless, but I don't have
> to
> deal with the timer and the subclassing.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
Dr. Demento Analogous Outlook code to read info into an array (or collection or whatever) Outlook VBA and Custom Forms 7
S Repair Outlook Using Outlook 7
V Outlook Form ListBox is not editable Outlook VBA and Custom Forms 2
F Outlook's contacts Using Outlook 1
D Outlook 2003 stopped dead Using Outlook 2
G Cannot receive emails from gmail account in Outlook 365 Using Outlook 1
E "Cannot display the folder. MS Outlook cannot access the specified file location" Using Outlook 5
P Outlook 2016 Working Offline Using Outlook 2
Rupert Dragwater Cannot reestablish gmail (email address) account in Outlook 365 Using Outlook 12
O Outlook 365 synchronisieren Exchange Server Administration 1
kburrows Outlook Classic - JPG files are corrupted when opened or saved Using Outlook 3
F Sync Outlook Calendar Using Outlook 0
G Change default font size in sticky notes - Outlook Desktop 2021 Using Outlook 2
C VBA in "New Outlook?" Using Outlook 0
D New Outlook with Business Basic Plans Using Outlook 0
D Outlook 2021 not working with Outlook 2003 installed Using Outlook 5
D Outlook 2003 stopped working - get they dialog box asking for username & Password Using Outlook 2
T Outlook 2021 hangs in close on taskbar occasionally Using Outlook 1
M Duplicate removal feature in Outlook 2021 is faulty Using Outlook 2
D.Moore Outlook COM addins source folder Using Outlook 13
P Removing Outlook 365 Account from Send/Receive Using Outlook 3
kburrows Outlook Automatically Merging Contacts Using Outlook 2
A Outlook 2016 Outlook 2016 vs. New Outlook Using Outlook 4
D Outlook Desktop App Email Software Using Outlook 0
efire9207 VBA Outlook Contacts Outlook VBA and Custom Forms 6
M Outlook not logging in to server Using Outlook 0
J Outlook macro to run before email is being send Outlook VBA and Custom Forms 3
R Outlook 2021 change view Using Outlook 2
K Outlook font corrupted in some point sizes, resets on close/open Using Outlook 2
J Is the Windows Outlook Tasks module really going to be gone? Using Outlook 6
F Outlook 2010 and Hotmail Using Outlook 1
A Outlook 2021 needs 'enter' for people search Using Outlook 2
HarvMan Outlook 365 Inbox Font Using Outlook 8
Retired Geek Outlook on MAC delete duplicate Sent emails Using Outlook 0
S New Outlook - IMAP ISSUES and support for addins? Using Outlook 1
C outlook.com fonts Using Outlook 2
mickymakz Common challenges organizations face when integrating SharePoint and Outlook? Exchange Server Administration 0
R Outlook with several IMAP accounts generating folders with 1111 suffix Using Outlook 0
D Send email from Outlook Alias using Mac? Using Outlook 0
G Reply a selected message and remove blank space before signature Outlook 365 version 2406 64BIT Outlook VBA and Custom Forms 2
G Reply a selected message and remove blank space before signature Outlook 365 version 2406 64BIT Outlook VBA and Custom Forms 0
kburrows "New" Outlook Desktop App Mailbox Size Using Outlook 4
N Best way to sync calendar and contacts between Outlook 365 and Outlook on iPhone Using Outlook 4
H Macro to Delete Duplicate items in Outlook calendar where title is the same and date is the same Outlook VBA and Custom Forms 0
Y The New Outlook - Q's & Thoughts Using Outlook 28
M Start Outlook 365 at unified inbox Using Outlook 2
B Requesting VBA code to make Outlook prompt for confirmation when deleting a task? Outlook VBA and Custom Forms 4
T In-line reply style in Outlook II Outlook VBA and Custom Forms 1
G Outlook Contact Item.Restrict where FullName is NULL Outlook VBA and Custom Forms 3
J Emails with .ICS calendar invitations attached don't contents when received in Outlook 365 Using Outlook 6

Similar threads

Back
Top