Removing Customization for Send As Attachment?

I need to provide "Send As Attachment" functionality to a customized document, but when sent to another user the customization should not be in place.

I didn't see a way to alter the existing "Send As Attachment" functionality to remove to automatically remove the customization. Did I overlook something?

I also tried to implement my own "Send As Attachment" functionality using MAPI. When invoked, my code does a SaveAs temp.doc followed by a SaveAs <original name> in order to create a copy of the working document. Then, I used ServerDocument.RemoveCustomization("temp.doc") to remove the customization but that fails because Word appears to still have temp.doc marked as being edited. Any thoughts on how to overcome this?

My next attempt will be to write the document out as XML and then use a stylesheet to remove the customization. Then, I'll attach the WordML representation to the email. Any other thoughts on how to achieve my goal?

Thanks in advance,

Neil

[1054 byte] By [NeilWeber] at [2008-1-10]