Outlook - edit right pane of mail
Asked By Ashish
10-Aug-09 10:28 AM
Is it possible to edit mail right pane in outlook addin? When select a mail
in outlook right pane shows its field like subject,date body,attachments
etc.
Can we show some extra information in right pane when select a mail. Which
event is call when show right pane(select mail) for any mail
Outlook 2007
(1)
Outlook
(1)
MightyI
(1)
InfoBar
(1)
Reminders
(1)
SichYou
(1)
ItemTo
(1)
Attachements
(1)
mightyCoCo replied...
il
h
if i got it right, you refer to the preview pane of an email.
What Outlook version?
Look into the Explorer.SelectionChanged event. this is triggered, when
an item was selected.
You may be able to modify certain information's in the selected item.
Ashish replied...
Thanks explorer.selectionChanged is called when switch an item or folder. It
also call when we select multiple items. I want to show some info in preview
pane when a single item is selected not for multiple selected items . But in
explorer.selectionChanged function Explorer->Selection->Count always returns
0. So i am not able to access selected item. Please suggest how to access
selected item. Why it always gives 0 as Count. Outlook version is 2003.
if i got it right, you refer to the preview pane of an email.
What Outlook version?
Look into the Explorer.SelectionChanged event. this is triggered, when
an item was selected.
You may be able to modify certain information's in the selected item.
Ashish replied...
Sorry i get correct selected item
To make change in preview window should i add info to mail or we can
directly change preview window? Is it editable
if i got it right, you refer to the preview pane of an email.
What Outlook version?
Look into the Explorer.SelectionChanged event. this is triggered, when
an item was selected.
You may be able to modify certain information's in the selected item.
mightyCoCo replied...
s
ich
You could change the body of the eMail. But this change would be
persistent.
I do not know of a clean way to show a temporarily modified body.
You would need to save the original mail somewhere else and restore
it, when the selection changes.
If you need to have more fields net to subject/date etc, that might be
possible with custom forms. But I have never done this. Maybe someone
else has some insights / tips...
Ken Slovak - [MVP - Outlook] replied...
Custom forms will not display in the reading pane for the most part, and the
reading pane is not editable or modifiable. You'd have to create your own
window and overlay that over the reading pane using Win32 API calls, which
is not only tricky but has the potential to crash Outlook and even Windows
if you do not know what you are doing.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
You could change the body of the eMail. But this change would be
persistent.
I do not know of a clean way to show a temporarily modified body.
You would need to save the original mail somewhere else and restore
it, when the selection changes.
If you need to have more fields net to subject/date etc, that might be
possible with custom forms. But I have never done this. Maybe someone
else has some insights / tips...
Ashish replied...
Thanks Ken, Thanks Mighty
I got it now. To show something in reading pane we need to make change in
mail. Without making change in mail we cant show anything extra in reading
pane as reading pane is not editable.
Well if a mail has attachment it shows an icon for it with subject in
outlook explorer. If any mail has no attachment then can we show
same/anyother icon at same place(after subject) using some programming. Is
it possible?
I did not see any property for this icon in outspy/MFCMAPI.
mightyCoCo replied...
g
s
he
wn
ich
ows
.
.
a
Look at the MailItem.Attachments method to add attachements to the
MailItem.
You can generate the attachement on the fly and add it as a binary
stream or write it on disk and give the Attachemts.Add function the
path to this file on disk.
You'd need to use the MailItem.Save method if you are finished to not
loose your changes.
Ken Slovak - [MVP - Outlook] replied...
The InfoBar is also not modifiable or exposed. What could be done possibly
is to use the model for previewers (like for previewing PDF attachments in
the reading pane) to display custom information. That would be Outlook 2007
only or later, and I am not sure it is actually doable. I have never played with
that for that purpose, only for an actual previewer. But it is the only
possibility I can think of.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
Ashish replied...
So if we need to show attachment icon in a mail which has no attachment then
we need add an extra attachment.
What about outlook objects? I think using outlook Objects we can make change
locally for a user not on exchange server. Is it possible to change mail
view using outlook object model? Is there any link how to use outlook
objects in outlook addin?
Ken Slovak - [MVP - Outlook] replied...
You can change the view by setting the Explorer.CurrentView object to the
view you want. You can also create a new view using XML and set that.
Of course you can work with Outlook objects in an Outlook addin, just use
the Outlook object model. How else do you think you would work with Outlook
objects? You can look at the Object Browser Help as well as at Web sites
such as www.outlookcode.com for lots of Outlook object model code samples.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
Ashish replied...
Yes we can create/change view using XML. But how to add attachment
icons/name in XML? Is there any example available?
What's advantages of using Outlook object model?
Can we also change view using Outlook object model
Ken Slovak - [MVP - Outlook] replied...
You cannot add anything to an XML view that is not supported as a view XML
tag. I am not sure what you mean by adding attachment names and icons to the
view, but nothing related to attachments is supported in view XML.
In Outlook 2007 they added a lot of new View stuff that was not there in
earlier versions of Outlook, but still not what you want.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
Ashish replied...
What i want to do?
When select a folder in outlook addin, show attachment icon for all
mails(which dont have any attachment) under this folder.
By default outlook displays attachment icon for those mails which have
attachments. But here i want to do it for those mails which dont have
attachments.
When select a mail(which dont have attachment) in outlook addin show an
attachment in right pane for this mail(this attachment exist on local system
and display in right pane of selected mail), this attachment should not add
to exchange server for this mail but we can show attachment in outlook only.
Is that possible? is there any way to do it
Ken Slovak - [MVP - Outlook] replied...
No, what you want is not possible. Instead of beating your head trying to do
something that cannot be done why not re-architect your design?
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
Ashish replied...
Thank you very much for clearing this doubt.
Bulletproof Exiting Outlook (and not crashing) Outlook In building an Outlook integration, I try to exit Outlook this way: Marshal.ReleaseComObject(objOutlook) objOutlook = Nothing Before I did this, sometimes this code would not execute, and Outlook would then get a bit messed up. I would have to load Outlook and wait for it to repair and / or shut down Outlook in the Task Manager. I do not want this ever to happen to a user code the best way to handle this scenario. I want to bulletproof an application with Outlook, and I do not want to corrupt a user's Outlook file. I am just
Outlook Calendar Sharing Publishing / Syncing Work Around Outlook It has come to our attention that some users are experiencing problems with their Outlook Calendar Sharing. I am here to let you know that we are actively working on currently have two workarounds (listed below) which will allow you to continue to use the Outlook Calendar Sharing Service. Common Symptoms: ??? When publishing a calendar to Office Online, Outlook prompts user to sign in, upon doing so Outlook throws an error stating ???The upload of ???<calendar name> ??? failed.??? ??? When refreshing Outlook???s Inbox via ???Send / Receive???, Outlook prompts user to sign in, upon doing so Outlook throws an error stating ???The upload
Option to display images from newsletters by default? Outlook Where is the option to display images from email newsletters by default so I do not have to click on the display images link? Thanks. Outlook Discussions Outlook 2003 (1) Outlook 2007 (1) Outlook (1) ISPs (1) Entourgae (1) Thedesktops (1) Newsletters (1) Attachments (1) There is no option in Outlook related to newsletter e-mails. Outlook has no means of identifying a particular e-mail as a newsletter. If you disable
Saving attachments to folder from public folder Outlook Hey there! I am currently working on a project that involves merging data from many into one Excel workbook for analysis. The csv files are sent to a public folder (outlook: \ Public Folders \ All Public Folders \ etc. . .) I thought the easiest way to do this would be to import the data straight from Outlook to the Excel file but after much painful testing I could not get it to main mailbox folders, not public and am unsure why. . . I have almost no experience with Outlook coding so any help is appreciated! This is the current code: If there is a instead of using a selection, that is fine too! Public Sub SaveAttachments() Dim objOL As Outlook.Application Dim objMsg As Outlook.MailItem 'Object Dim objAttachments As Outlook.Attachments Dim objSelection As Outlook.Selection Dim i As Long Dim lngCount As Long Dim strFile As String Dim strFolderpath
Handling application.quit event Outlook Hello, i am developing an exe application and i use global object to declare outlook application withevents. I use outlook 2007 sp2 and i am having trouble releasing my variable references or reusing then. I use this code : Public Class StartOE Private WithEvents o As Outlook.Application = Nothing Private ns As Outlook.NameSpace = Nothing Private omFolder As Outlook.MAPIFolder = Nothing Public Sub New() If detectOutlook() Then o = GetObject(, "Outlook.Application") Else o = New Outlook.Application End If Try ns = o.GetNamespace("MAPI") ' get namespace