none
How to stop displaying inbox item in editing mode RRS feed

  • Question

  • HI All

    I am facing one issue that when I am trying to look mail item in inbox, all items are appearing in editing mode. These items are basically those items which I had modified before sending. I had handled itemsend event and there I am modifying mail adding some custom properties and then saving it calling .Save method. These mails in inbox looking in editing mode. Am I missing some property. Please have a look of following screen shot. Can some body please help.


    Monday, August 7, 2017 9:38 PM

All replies

  • Hello Devendra,

    I bet the Save method call causes a new item (saved to the Inbox folder). So, please try to remove the Save call from the ItemSend event handler and see the results. Does it help?


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Monday, August 7, 2017 9:54 PM
  • Hi Eugene,

    Thanks for reply. I am happy to see you. But I have tested it and it is not the case. Seccond is that I want to modify mail before sending as removing and adding attachments. If I will not call save then it will not send modified mail.

    Thanks

    Devendra

    Monday, August 7, 2017 10:17 PM
  • Hi Eugene,

    I have removed the save method and try to send mail. It seems it is working. I will test thoroughly tomorrow and then will update here.

    Thanks

    Devendra

    Monday, August 7, 2017 11:09 PM
  • Hi Eugene,

    Just checked again. This issue occurs again. This time I am not saving any thing. But still it appears in editing mode on receiver's mail box. So this is not working :( .

    Thanks

    Dev

    Monday, August 7, 2017 11:26 PM
  • Devendra,

    Another solution is to cancel the default action - the sending operation. The Cancel parameter is passed to the ItemSend event handler. If the event procedure sets this argument to True , the send action is not completed and the inspector is left open. So, you can do whatever you need with an Outlook item and then call the Send method anew programmatically.


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Monday, August 7, 2017 11:37 PM
  • HI Eugene,

    Thanks for suggestion. My requirement is that I want to modify the mail after user click on send button and then send modified mail instead of original one. Now even if I cancel the event here and again send programmatically, I think, I will get in same loop as again ItemSend event would be called.

    I am trying to figure out that how outlook identifies that this mail is in compose mode instead of normal mail. I have seen one more case. If I go to set File->option->Mail and select "Open replies and forwards in new window", its compose mode has gone.

    But as soon as I double click on mail, it opens in compose mode itself. Can you guide me please ?

    Thanks

    Devendra

    Tuesday, August 8, 2017 12:11 AM
  • Devendra,

    You can add a marker to an Outlook item for skipping the ItemSend routine next time. For example, it can be a user property or any other hidden property such as PR_COMMENT. Don't forget to erase it before the message goes out.


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Tuesday, August 8, 2017 12:33 AM
  • HI Eugene,

    I think, now I have got the problem. Problem is when I am opening a mail, I am modifying a mail (as I am decrypting it for user). However I want this modification temporarily as I dont want to save decrypted mail. Now in this process of modification, I replace encrypted attachment with decrypted one.

    Now problem is when I click to close the mail, I again modify mail to make in old form (like removing new decrypted attachments and adding encrypted attachments). Now because of this on closing, outlook shows message :--

    "This mail has been modified. If you want to save it."

    I want to avoid this message. I have tried calling close method of mailItem by calling olDiscard but it does not work in close event (Microsoft has confirmed).

    To avoid this, I call save method on mail while closing it after modify it to actual encrypted form. Now issue is it makes outlook feel that inbox item has been modified. Thats why it shows that this item has been modified, and provide you option in composing it.

    Do you know if there is any way by that I can handle close button of read window i.e. "X" button. Then I can stop going in close and just call mailItem.close with oldiscard ? It would be great help.

    Thanks

    Devendra


    Thursday, August 10, 2017 9:23 AM
  • Hi Devendra Tewari,

    I think that it is better to change the logic because I think it will work little slow.

    because you are doing many things like first decrypting it then modify it and again encrypt it.

    so it takes a little more time after user click the send button.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, August 15, 2017 9:08 AM
    Moderator
  • HI Deepak,

    It is part of my requirement. However my question is related to editing here. I am still looking for answer.

    Thanks

    Devendra

    Sunday, August 20, 2017 2:32 AM
  • Hi Devendra Tewari,

    all I can say that you are trying to work against the flow of Outlook.

    Outlook is trying to work as it should but you forcefully want it to do not work like that.

    which is issue here.

    so that why I think that you need to change your logic and try to work with the flow of outlook for a smooth operation.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, September 8, 2017 5:09 AM
    Moderator
  • Hi Deepak,

    It seems it was some outlook bug which was fixed in some hot fixes. When I have updated my machine with new hot fixes, this issue has been resolved.

    However I am still unable to understand your comment :--

    "all I can say that you are trying to work against the flow of Outlook."

    How it is against the flow of any mail client. It is very common in any platform that you can send encrypted mails and then decrypt them while reading (only for user) and then again encrypt them while closing.

    Outlook provides you online mode which does not save any mail in user's system. In that case, if we leave it as decrypted, other mail clients which are connected to same exchange server can see this mail. It is not good from cyber security point of view.

    Only work around is (like PGP has done it) that use your own UI to make customize read pane but then again outlook has their limitation to override view list and that is the reason then even after so many years, Symantec guys are not able to provide encryption in subject.

    Please suggest if I have misunderstood you.

    Thanks

    Dev

    Thursday, November 2, 2017 9:46 AM
  • Hi Devendra Tewari,

    all I am saying that ,you are decrypting a mail then opening the mail , modify it.

    then you don't want to save the modify the changes and want to encrypt it again will be little more time consuming.

    I can see that your issue is now solved.

    so I suggest you to mark your last post as an answer.

    it will help us to close this thread.

    also it will help other community members in future who will face same kind of issue.

    thanks for your understanding.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, November 3, 2017 1:11 AM
    Moderator