none
Hidden attachments are visible to attendees RRS feed

  • Question

  • I have written a code to hide attachments(by setting position to zero). In case of organizer its working fine but attendees are able to see those attachments 
    prachi K.
    Friday, January 6, 2012 2:53 PM

All replies

  • Why not strip the attachments when a meeting request is sent?
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!
    Friday, January 6, 2012 10:29 PM
  • Hi Dmitry,

    Thanks for Reply.

    I dont want to remove those attachments. At the attendee side also i want those attachments in hidden form.

    Please suggest some solution

    • Edited by LoloPolo Monday, January 9, 2012 6:09 AM
    Monday, January 9, 2012 6:08 AM
  • I have not tried that, but you might want to set the PR_ATTACHMENT_HIDDEN property (0x7FFE000B) on the attachments in the Application.ItemSend event when you are processing the outgoing MeetingItem object.

    You migth also want to set the UseTnef property (http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8582000B) to make sure the meetign request in sent in the TNEF format and all MAPI properties are preserved.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!
    Monday, January 9, 2012 6:16 AM
  •  

    Hi Dmitry,

    Thanks for your suggestion. Could you please provide some code sample to set PR_ATTACHMENT_HIDDEN property.

    The link that you shared is not working.

     

     
     

    prachi K.
    Monday, January 9, 2012 9:38 AM
  • The link you are talking about is a special name for MAPI field that you should set using PropertyAccessor in outlook's OOM. It is not a link to any page. Sample code:

    Attachment a = GetAttachment();

    a.PropertyAccessor.SetProperty("http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8582000B", propervalue);

    Monday, January 9, 2012 3:47 PM
  • Actually this property (UseTnef) needs to be set on the meeting request itself, not the attachment.

    PR_ATTACHMENT_HIDDEN property (DASL name http://schemas.microsoft.com/mapi/proptag/0x7FFE000B) needs ot be set on the attachment.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!
    Monday, January 9, 2012 5:54 PM
  • Hi Dmirty,

    Thanks for reply

    I tried following lines of code

    attachment=(Microsoft.Office.Interop.Outlook.Attachment)appointment.Attachments.Add("Path", Microsoft.Office.Interop.Outlook.OlAttachmentType

    .olByValue, 0, "AttachmentName");

    attachment.PropertyAccessor.SetProperty(

    "http://schemas.microsoft.com/mapi/proptag/0x7FFE000B", true);

    but still attendee can see those attachments. Any solution?

    • Edited by LoloPolo Tuesday, January 10, 2012 11:04 AM
    Tuesday, January 10, 2012 11:00 AM
  • Did you set the UseTnef property on the meeting request to make sure it goes out in the TNEF format?

    Have you tried to look at the meetign request in the Sent Items folder with OutlookSpy or MFCMAPI to make sure the properies are correctly set?


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!
    Tuesday, January 10, 2012 8:11 PM
  • Hi Dmirty,

    I checked with OutlookSpy, PR_ATTACHMENT_HIDDEN is coming true but still attachments are visible to attendees.

    How to send meeting request in TNEF format? Can you plz tell me following code is right or not(to set TNEF format)?

    currentMeeting.PropertyAccessor.SetProperty("http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8582000B", Outlook.OlBodyFormat.olFormatRichText);

    Thanks.

    • Edited by LoloPolo Monday, January 16, 2012 8:59 AM
    Monday, January 16, 2012 8:58 AM
  • Do you set this on item you recieved in ItemSend event or in code behind in meeting window?

    Monday, January 16, 2012 1:10 PM
  • Hi DamianD,

    I have written this code on item send event of meeting request. This code will execute Whenever i sends a meeting request 

    Thanks.

    Tuesday, January 17, 2012 5:44 AM
  • i haven't checked it myself, but maybe use 1 instead of olFormatRichText when setting property in ItemSend
    Tuesday, January 17, 2012 9:47 AM
  • Hi,

    I set both the properties properly. I checked both properties PR_ATTACHMENT_HIDDEN  and UseTnef through OutlookSpy, they both are coming true but still attachment is still visible to attendee.

    Any suggestions?

    Tuesday, January 17, 2012 12:24 PM
  • Are atendees also using outlook?

    try setting on each attachment that you want to hide also following mapi props:

    PR_ATTACH_FLAGS

    http://schemas.microsoft.com/mapi/proptag/0x37140003 - value 4

    PR_CONTENT_ID

    http://schemas.microsoft.com/mapi/proptag/0x3712001E - some random string starting with "cid:"

    Tuesday, January 17, 2012 12:46 PM
  • Are these properties set when the attendee receives the meeting invitation?


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!
    Tuesday, January 17, 2012 1:55 PM
  • property http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8582000B must be set an a boolean (true), not an integer (Outlook.OlBodyFormat.olFormatRichText).
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!
    Tuesday, January 17, 2012 1:57 PM
  • Hi DamianD,

    Thanks for your suggestion.

    I am trying to set those properties on that attachment but an UnAuthorizedAccessException is coming "The property http://schemas.microsoft.com/mapi/proptag/0x37140003 does not support this operation."

    Wednesday, January 18, 2012 12:13 PM
  • Hi Dmirty,

    I set both the properties properly. I checked both properties PR_ATTACHMENT_HIDDEN  and UseTnef through OutlookSpy, they both are coming true but still attachment is still visible to attendee.

    This is the code

    currentMeeting.PropertyAccessor.SetProperty(

    "http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8582000B", true);

    Any suggestion?

    Thanks

    • Edited by LoloPolo Wednesday, January 18, 2012 12:17 PM
    Wednesday, January 18, 2012 12:14 PM
  • are recipients using outlook?

    what happens if you only set pr_attachment_hidden and pr_content_id on attachments and usetnf on item?

    Wednesday, January 18, 2012 1:09 PM
  • I set both the properties properly. I checked both properties PR_ATTACHMENT_HIDDEN  and UseTnef through OutlookSpy, they both are coming true but still attachment is still visible to attendee.

    I am trying to set pr_content_id and PR_ATTACH_FLAGS properties on that attachment but an UnAuthorizedAccessException is coming "The property http://schemas.microsoft.com/mapi/proptag/0x37140003 does not support this operation."

     

    I am writing same statements again and again but not getting any solution

     

     

     

     

    Wednesday, January 18, 2012 1:22 PM
  • in last email i asked you to set PR_CONTENT_ID and not PR_ATTACH_FLAGS, please verify this scenario.
    Wednesday, January 18, 2012 2:37 PM
  • i set that PR_CONTENT_ID as "cid:Hello" and i can see that in outlook spy.

    PR_ATTACHMENT_HIDDEN and UseTNEF are also coming true.

    After setting PR_CONTENT_ID, PR_ATTACH_FLAGS is automatically coming 4 in outlook spy

    But still that attachment is visible to attendee.

    Thanks.

     



    • Edited by LoloPolo Thursday, January 19, 2012 11:45 AM
    Thursday, January 19, 2012 10:54 AM
  • Could you paste a screenshot showing problem on atendee machine? (feel free to blank out any sensitive information)

    Thursday, January 19, 2012 12:04 PM
  •  

     

     

    I want those attachments hidden, but they are visible to attendees


    • Edited by LoloPolo Thursday, January 19, 2012 1:19 PM
    Thursday, January 19, 2012 1:17 PM
  • Immediately afer adding each attachment, set its PR_RENDERING_POSITION property (http://schemas.microsoft.com/mapi/proptag/0x370B0003) to -1.
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!
    Thursday, January 19, 2012 1:43 PM
  • Hi Dmirty,

    It is already coming -1.

    Thanks

    Friday, January 20, 2012 5:03 AM
  • Hi Dmirty and DamianD,

    On my side everything is coming fine in outlook spy in Sent items

    I checked on attendee's end with outlook spy and here is the result

    Friday, January 20, 2012 9:49 AM
  • We are using Smarter mail services. Can this be the problem?
    Friday, January 20, 2012 1:51 PM
  • Can you save the items from the Sent Items folder and the Inbox folder as MSG files, zip them (important!) and send them to me at dmitry at dimastr dot com?
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!
    Monday, January 23, 2012 11:54 PM