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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top