locked
outlook.application mailitem --> howto open form as reply? RRS feed

  • Question

  • hey,

     

    i want to open a mail in outlook

    i do this atm this way:

      mailFolder = nameSpace.getDefaultFolder(6);
      mailItem = mailFolder.Items.add('IPM.Note.FormA');
    

    this works good so far

     

    but: i want to open a mailwindow as a reply

    cause: if i start to write in this mail, the text format should be the same as the text format in an reply message

     

    e.g. in an normal mail u have black colour and in an replymail u have blue colur

     

     

    is there a way to do this?

    • Moved by Leo Liu - MSFT Friday, March 4, 2011 7:11 AM Off-topic, moved for better support. (From:JScript for the .NET Framework)
    Wednesday, March 2, 2011 12:46 PM

Answers

  • Why not check how Outlook sets the color for replies in HTMLBody and do the same in your message?
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    • Proposed as answer by Bessie Zhao Thursday, March 10, 2011 10:10 AM
    • Marked as answer by Bessie Zhao Friday, March 18, 2011 6:04 AM
    Monday, March 7, 2011 11:40 PM

All replies

  • Hello,

    Thanks for posting. If I understand this issue correctly, the message class of the replied mail is IPM.Note.FormA when replying a mail item. Actually, Outlook object model does not expose a method/property to check if the current mail item is replied. However, as Sue said in this thread: http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/1130684a-4283-4318-bcc6-4f849cb447c0/, MAPI property may be what you want. I am not familiar with this part, and hope it could help you. Then we could use MailItem.MessageClass property to set the mail item as IPM.Note.FormA. For this property, please see this MSDN page: http://msdn.microsoft.com/en-us/library/bb175508(v=office.12).aspx.

    If you have any concern on this post, or I have mistaken this issue, just feel free to follow up. Have a nice weekend.


    Bessie Zhao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, March 4, 2011 9:07 AM
  • Why not set the HTML body that explicitly specifies the appropriate text color?
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Friday, March 4, 2011 5:10 PM
  • ty for the answer

     

    but im in javascript and i dont think i can do it this way :(

     

     

    to dmitry: i dont want to specifiy the textcolor cause this is an other behaviar than to write in a reply message

    in a relpy message, every text i am writing is in the specified color, no matter if im in the text of the email or outside

     

    if i specify a color, i can specify it only in the place where no text is written

    if i want to write something in the text, its not the new color

     

    i hope i could explain it with my bad english :)

    Monday, March 7, 2011 12:23 PM
  • Why not check how Outlook sets the color for replies in HTMLBody and do the same in your message?
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    • Proposed as answer by Bessie Zhao Thursday, March 10, 2011 10:10 AM
    • Marked as answer by Bessie Zhao Friday, March 18, 2011 6:04 AM
    Monday, March 7, 2011 11:40 PM