Outlook Add-In Mail Item How to save the mail item (which is in compose mode) as a .msg file in non editable form?

Hello,
I am working on an outlook add-in where I have a custom button on the ribbon tab of compose mail item.
My requirement is to save the mail item currently being composed as a .msg file at a predefined location on click of my custom "Save" button. I am able to do it using "mailItem.SaveAs(...)".
But my problem is, when I open the .msg file in outlook, it is opened in compose mode but I want to see it as a read-only item. For e.g. exactly the way it looks when I save it after it's sent.
Could you share any ideas on how to achieve this?
Thanks,
Vinay
-Vinay Pugalia
If a post answers your question, please click "Mark As Answer" on that post or
"Vote as Helpful".
Web : Inkey Solutions
Blog : My Blog
Email : Vinay Pugalia

Strictly speaking you need to *remove* the MSGFLAG_UNSENT bit (=8), not set the MSGFLAG_READ bit, so setting the PR_MESSAGE_FLAGS property to either 0 or 1 will work. Keep in mind that you can remove the MSGFLAG_UNSENT bit only before the message
is saved for the very first time. If you touch the bit after the message was saved, the message will stay unsent.
Also note that this may not be what the user wants since the message will become read-only when reopened.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/redemption
Redemption - what the Outlook
Object Model should have been
Version 5.5 is now available!

Similar Messages

  • SPListItem deleting save the list item into another list.

    Hi Friends,
    Using SPList Item deleting event receiver ,before deleting the item I want save the list item to the another SharePoint list.
    How can we do this using event receivers.Please help me anyone.
    Thanks,
    Tiru
    Tiru

    Before delete the item, use the below logic
    http://stackoverflow.com/questions/1075323/copy-list-items-from-one-list-to-another-in-sharepoint
    or
    You can do this by 2 workflows one creating list item by copying and second workflow on the copied item which will delete the original list item.
    http://sharepoint.stackexchange.com/questions/93441/move-items-from-one-list-to-another-list-using-sharepoint-designer-2010
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/100c0b3c-72d9-4427-a48f-8300be508aa2/how-do-i-copy-the-items-in-a-sharepoint-2010-list-to-another-list?forum=sharepointgeneralprevious

  • How to add a new column (Project Number) in the action items table under NPD Module?

    There are two projects with same name and created by same person in NPD.
    So when it is displayed in "Action Items" table, It looks similar.
    To avoid this, I need one more column (Project Number) to be added in the "Action Items" table and " Strategic briefs and projects" table.
    So, How to add a new column (Project Number) in the "Action Items" table and " Strategic briefs and projects" table under NPD Module?
    Please do the needful.

    There is no out of the box configuration available to add columns to NPD action items.   As always we welcome enhancement requests. 
    Thanks
    Kelly

  • How to know the mail send by outlook or owa ?

    how to know the mail send by outlook or owa ?
    Please click the Mark as Answer button if a post solves your problem!

    Hi Eric,
    I think there is no possible way to check if the mail is sent was from Outlook or OWA.
    Regards.
    Naren Neelam, Messaging Consultant, ITBigBang (P) Ltd Www.ITBigBang.Com | Hire Us for Messaging Consulting
    It actually is possible for an admin to tell if a message was sent from Outlook or OWA by looking at the MessageTracking and the information in
    SourceContext. MOMT is Outlook and the other two speaks for them self.
    Get-MessageTrackingLog -Start 2014-05-12 -Sender
    [email protected] -EventId submit | fl Sender,sourceContext
    Sender        :
    [email protected]
    SourceContext : MDB:995793b8-2c2c-4a14-b617-3e54371179ec, Mailbox:5e29199f-b877-46ed-b985-f2ede9bad293, Event:8351505, MessageClass:IPM.Note, CreationTime:2014-05-12T16:41:29.038Z, ClientType:MOMT
    Sender        :
    [email protected]
    SourceContext : MDB:995793b8-2c2c-4a14-b617-3e54371179ec, Mailbox:5e29199f-b877-46ed-b985-f2ede9bad293, Event:8351552,MessageClass:IPM.Note, CreationTime:2014-05-12T16:44:52.039Z, ClientType:OWA
    Sender        :
    [email protected]
    SourceContext : MDB:995793b8-2c2c-4a14-b617-3e54371179ec, Mailbox:5e29199f-b877-46ed-b985-f2ede9bad293, Event:8351611,MessageClass:IPM.Note, CreationTime:2014-05-12T16:46:25.772Z, ClientType:AirSync
    Martina Miskovic

  • On Mail, how to save each mail on my computer?

    Hello!
    Since i downloaded Maverick on my computer (MacBookPro 13" 2011), i have a problem with Mail.
    It only keeps the emails of the 3 last months. How to save each mail i send/receive on my own computer (physically/localy)?

    i do not understand what you mean with "set it for On my Mac and you can drag the email there"
    i have no such option... i can NOT drag the email there!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • How to save the image in the form?

    As thread, how to save the image into a file from the pdf form - image box?
    I have Adobe Acrobat 9 Pro extended.

    Hi Sandy,
    Sorry for Delay.Could you please provide script code for the Button and in which event we want to add the code
    I want to Save the lot of images in the PDF. For that I kept Image field in the form.Here I am able to upload the images but those are not saved.
    If possible please share the details document.
    Please help me.
    Thanks,
    Ravi.

  • How to find the selected item in alv grid or table control

    can any one tell me please
    how to find the selected item in alv grid or table control

    In table control, If you goto screen painter and goto table control properties ( f2 ), there is one check-box w/selColumn check that and give column name. Then add that column to your internal table.
    IN PAI
      LOOP AT it_tkhdr.
        FIELD it_tkhdr-sel_row
          MODULE tab_tkhdr_mark ON REQUEST.
      ENDLOOP.
    MODULE tab_tkhdr_mark INPUT.
      MODIFY it_tkhdr INDEX tc_tkhdr-current_line.
    ENDMODULE.                 " tab_tkhdr_mark  INPUT
    here it_TKHDR is internal table sel_row is field for selection
    After that, you can loop at it_tkhdr where sel_row is 'X' to get selected rows.
    regards,
    Gagan

  • How to save the data present in TEXT BOX?

    Hi friends i am able to create a text editor in one of my screen but i want to know how to save the data when the text is entered in that text box and retrive when they open the screen?

    Hi ,
    Please check the format below since it is based on a working code
    first you need to create a text in s010 function module...
    there should be some key based on which you plan to save the text..imagine it is Purchase order then..PO+item numner is always unique.eg:0090010(900PO/item10).so in the code you can append these two and they will be unique..so you can always retrieve them,overwrite,save them anytime you need
    **************data declarations
    TYPES: BEGIN OF TY_EDITOR,
    EDIT(254) TYPE C,
    END OF TY_EDITOR.
    data: int_line type table of tline with header line.
    data: gw_thead like thead.
    data: int_table type standard table of ty_editor.
    ****************fill header..from SO10 t-code..when you save you need the unique key..youfill it here and pass it in save_text function module
    GW_THEAD-TDNAME = loc_nam. " unique key for the text -> our unique key to identify the text
    GW_THEAD-TDID = 'ST'. " Text ID from SO10
    GW_THEAD-TDSPRAS = SY-LANGU. "current language
    GW_THEAD-TDOBJECT = 'ZXXX'. "name of the text object created in SO10
    *To Read from Container and get data to int_table
    CALL METHOD EDITOR ->GET_TEXT_AS_R3TABLE
    IMPORTING
    TABLE = int_table
    EXCEPTIONS
    ERROR_DP = 1
    ERROR_CNTL_CALL_METHOD = 2
    ERROR_DP_CREATE = 3
    POTENTIAL_DATA_LOSS = 4
    others = 5.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    loop data from int_table and save to int_line-tdline appending it.
    *save the text
    CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
    HEADER = GW_THEAD
    TABLES
    LINES = InT_LINE
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    OBJECT = 4
    OTHERS = 5.
    IF SY-SUBRC 0.
    ENDIF.
    *To pass to Container
    CALL METHOD EDITOR ->SET_TEXT
    hope that the above sample with helps you solve the problem
    Please check and revert,
    Reward if helpful
    Regards
    Byju

  • How to remove the Page Item in thin Bean JSP

    Hi, I'm wondering how to remove the Page Item in JSP developed by BIBeans, since I have tried to remove the Presentation's Page Item in BiBeans Catalog, but with no result in JSP. Thank you!
    Jeff

    There are two ways to do this:
    1) If you want to remove and individual dimension from a presentation, you can hide the dimension. This can be performed directly from within QueryBuilder. Within the first section of Query Builder that shows the selected measures selected and associated dimensions, simply remove the required dimensions from the right dialog panel.
    2) To hide all page items within a presentation, simply add the following the property, pagingControlVisible="False", to the presentation tag in your JSP. For example:
    <orabi:Presentation location="Local Computer Sales/Products/KPI Sales Prior Period and Prior Year" id="BIProductKPIs_pres2" pagingControlVisible="False"/>
    Hope this helps
    Business Intelligence Beans Product Management Team
    Oracle Corporation

  • How to save the credentials in windows security when opening a report?

    How to save the credentials in windows security when opening a report?
    in Silverlight program, user click a link to SQL server report services link, it pops up a new IE window and ask for windows security.
    Type the user name password in and check save password. reports showed and close IE. user click again, the same windows security popup dialog showed up. how to really remember the credentials?
    If keep the IE open, reports shows in second tab of the same IE window for the second click, and it didn't ask for the windows security.

    Hi Lascorpion,
    According to your description, users need to type username and password before they can open the SSRS report when reopening IE, right? If I have anything misunderstood, please point it out.
    Base on my research, this issue offten occurs on IE9 which ships with Windows 7 operating systems. In this case, to avoid this issue we can add the report URL to the trust site, for the detail information, please refer to the link below.
    SSRS Prompt for username and password in IE
    Regards,
    Charlie Liao
    TechNet Community Support

  • How to delete the downloading items in itunes?

    how to delete the downloading items in itunes?

    Unfortunately, this doesn't work. If you let them download and delete them, they just download again at some point in the future. I've been trying to figure this one out myself, but so far, every time I remove something, it comes back "later".
    Steve

  • How to understand the "New Item" icon at the bottom of the Project window

    I'm trying to understand that small "New Item" box at the bottom of the project window better. I'm aware that when I bring video clips into my project, if I drag them to this box, PPCS5 will add them to the timeline. I partially understand the positive reasons for doing so, primarily that PPCS5 will correctly identify the type of video being brought into the project. I know that if I select all my clips and drag them to the new item box, that all my clips will be added to the timeline at the same time and all together on the timeline. There are many things I don't understand about it. If I add my clips one by one using the "New Item" icon, they will show up as separate sequences on the timeline. If you try to add another clip at a later time, can that clip not be added using the "New Item" box?  One other question is what would be the advantage in putting clips on the timeline as separate sequences? And one further question is do you drag other items to this box besides video clips? Like music, and still images?

    Dragging something to the New Item icon doesn't just add that something to a sequence.  It actually creates the correct sequence for the something to be added to.
    You do this once, when you need a new sequence.  Anything else you want to add to that sequence you do by other means.

  • TS3999 In MONTH, (PC) iCal only clearly lists 2 items a day. The 3rd item is "faded" and bottom portion cut off, w/ a "more" triangle in the lower-right corner. How can I expand (vertically) so the 3rd line posts clearly, and ONLY shows "more" if 4+ event

    In MONTH, (PC) iCal only clearly lists 2 items a day. The 3rd item is "faded" and bottom portion cut off, w/ a "more" triangle in the lower-right corner. How can I expand (vertically) so the 3rd line posts clearly, and ONLY shows "more" if 4+ events?
    Better yet... as there's a lot of "wasted" space w/ too large Month title and empty space surrounding the Month title above and too much space surrounding the month/year slider bar below, how can I minimize these to allow me more usable / valuable calendar "contents" so I don't need to waste so much time clicking "more" just to see the bottom of the truncated third event and find out there are no 4+ events posted that date?  i.e. more "user-friendly" presentation?
    Thx!
    [email protected]

    In MONTH, (PC) iCal only clearly lists 2 items a day. The 3rd item is "faded" and bottom portion cut off, w/ a "more" triangle in the lower-right corner. How can I expand (vertically) so the 3rd line posts clearly, and ONLY shows "more" if 4+ events?
    Better yet... as there's a lot of "wasted" space w/ too large Month title and empty space surrounding the Month title above and too much space surrounding the month/year slider bar below, how can I minimize these to allow me more usable / valuable calendar "contents" so I don't need to waste so much time clicking "more" just to see the bottom of the truncated third event and find out there are no 4+ events posted that date?  i.e. more "user-friendly" presentation?
    Thx!
    [email protected]

  • How to configure the mail in Sales Support of SAP SD

    Hi,
    Experts I have one scenario in my co. that we have 300 users we have to send the mails to our 300
    users for every 2 or 3 months once. Regarding new promotions (Discounts , Price changes) of
    company.  For this every time we are changing the sold to party in quotation and taking printouts then
    sending to our users its a lengthy procedure, to avoid this long time very soon we are going to
    implement SAP SD Sales Suppor in our company is there any functionality in SAP to send mail at
    once to our 300 users  may i know about how to configure the mail for this scenario.
    Thanks and Regards
    MH

    Hi  Prashant,
    Thanks for you immediate responce, Can you give me the configuration steps in detail.
    Thanks and Regards,
    MH

  • How to save the detail view of a task in a database?

    Hi experts,
    I need to save the detail view which we get after selecting the work item in the table list in UWL. Can anyone provide me the solution for it step by step as I have no prior knowledge of portal.
    Thanks,
    Amit.
    PS: Points will be rewarded.
    Edited by: amit sinha on Jun 4, 2008 5:41 PM

    Hello,
    take a look on the below example :
    --Initialize data
    Create table #tmp (id int,name varchar(50),marks int)
    Insert into #tmp values (1,'a' ,3)
    Insert into #tmp values (2,'b',5)
    --Decalare variable
    Declare @maxid int, @minMarks int
    --Take data from table
    Select @maxid=max(id),@minMarks= min (marks) from #tmp
    --Select data storead in variables
    Select @maxid,@minMarks
    Drop table #tmp
    Ahsan Kabir Please remember to click Mark as Answer and Vote as Helpful on posts that help you. This can be beneficial to other community members reading the thread. http://www.aktechforum.blogspot.com/

Maybe you are looking for