open embedded attachment from different location
We are creating the mail items from outlook add-in. Most of them will have the document attached with them.
We are having documents of large size and can be part of many mails. So while we are creating the mailitems we are extracting the first page of the document and create a document from that and attaching that only with the mail item which is really small, so the pst size will be small and the preview will also work fine if user selects the attachment because it have the embedded attachment.
But when user tries to open to the attachement by double click, it should open the large document instead of embedded one. so we want to open the attachment from some other location rather than embedded one in mail item. I tried with BeforeAttachmentRead but dont find a solution for that.
All Replies
- Hi, why not put the documents on a fileserver share and attach the documents as link to an UNC path.
Then it will work inside your Organization.
It won't work when you send the mail outside - then you need to attach the document.
Greets - Helmut
Helmut Obertanner [http://www.x4u.de] [http://www.outlooksharp.de] - Hi Helmut,
great to see you again.
We are creating the outlook add-in application as enhancement of our live web application, which can be download and installed by client and we cant expect any network environment from them as they can be accessing the outlook add-in application in disconnected mode also, so we are keeping some folder structure on client pc to download and maintain the docs there with some restriction.
Also if we are making the attachment as "OlAttachmentType.olByReference" then it wont show the preview of the document if i select the attachement in mail item, which we have to keep show and the same document can be used in multiple mail items so we cant attached the bulky document to all the mails. So to keep the document visible in preview, we are extracting the first page of the document and making the attachment as embedded to mail item. But when user double click the attachment to open, then we have to show the complete document which is maintain somewhere in his pc.
No where i found any option to redirect the opening of attachment (not preview) to some other document at run time. - Hi Vijay,
not using Outlook Object Model as I know.
The only thing that comes in my mind here is maybe an Anti-Virus API.
But this is pure Windows-Api - I'm not specialized in it.
Maybe here you get notifications before an Item is accessed - so that the "Scanner" can interact and show something different -
or download the real file and replace the attachment before it is opened.
Just an Idea.
But it's out of VSTO scope.
Greets - Helmut
Helmut Obertanner [http://www.x4u.de] [http://www.outlooksharp.de]- Unmarked As Answer byvijay kumar anand Sunday, November 15, 2009 7:04 PM
- Marked As Answer byBessie ZhaoMSFT, ModeratorSaturday, November 14, 2009 10:16 AM


