Question

Using COM and MAPI, we are trying to rename an attachment in an MSG file. I've got everything working (we get the IAttach interface, then use GetProps and SetProps), but I'm nervous about making sure that we change all the properties we need to.

Does anyone know if the following is sufficient?

Check and if present, change value of:

  • PR_ATTACH_EXTENSION_W
  • PR_ATTACH_FILENAME_W
  • PR_ATTACH_LONG_FILENAME_W
  • PR_DISPLAY_NAME_W

Also, will setting the _W values automagically set the _A values? I think yes, but can't find and reference documentation that says one way or another.

Was it helpful?

Solution

MSG files do not automatically update the other flavor of a property - if you set PR_ATTACH_EXTENSION_W, PR_ATTACH_EXTENSION_A will not be automatically created/updated. You can check if a particular property exists, then update it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top