0
votes

I am currently making an Add-In for Microsoft Outlook.

Situation:

  • I get a Internet Message ID (IMID) from a database
  • I get the Entry ID of the Mail by searching for the IMID
  • I get the Outlook.MailItem with the EntryID
  • Right now, I open the mail in a new window (inspector) with the Display() Method, but I dont want a new window to pop up every time

Now I have the MailItem and want to preview it in the Outlook-Preview panel. Anyone knows a way to do that?

Thanks, Florian

1
Do you have to show it in the preview or would it be sufficient to open it in an inspector (in its own window)? You can show emails in an inspectorby calling .open (?) method of the mailitem.AlexS
I currently open the mail in a new inspector with Mailitem.Display(), but im not very satisfied with that. This will be the last solution I use.Florian Schöffl
Ok, sure. The only way I know is to set the selection in the current explorer. But prior to this you should check if the preview pane is active. Users may deactivate this. What's the problem with opening it in an extra inspector?AlexS
The whole Add-In is (kind of) ment to replace the normal Outlook-Email-Selection-List, and if the user always has to click on the red X to open another Mail, he will get crazy. Which property is for the Preview? I searched the currentExplorer().Panes, but there is nothing, that looks usefull to me!Florian Schöffl
As fas as I remember it is sufficient to set the selection of the explorer to the desired mailitem in order to display it in the preview. Probably the solution: stackoverflow.com/questions/10205103/… ?AlexS

1 Answers

0
votes

With my forgotten knowledge an this post, here is the solution:

Deselect all items in the current explorer with Explorer.ClearSelection() and select the item with Explorer.AddtoSelection() to display the item in the preview pane.