What I need is embedded link to object. In word document there should be icon (link to embedded file to Word doc), when user click on it, separate window (Excel, Acrobat Reader) should be displayed.
I've achieved this by changing 121 line of attached sample
from:
doc.LastParagraph.AppendOleObject(@"..\..\Data\NorthwindTemplate.xls", pic, OleObjectType.Excel_97_2003_Worksheet);
to:
doc.LastParagraph.AppendOleObject(@"..\..\Data\NorthwindTemplate.xls", pic, OleObjectType.Package);
Everything is fine. In generated Word document I can see an icon with embedded object(XLS file) but then I click on it and close opened (Excel) window, icon disappears from Word document. What's more if you save the opened word document (Save as .. option) and open it you cannot open embedded document again. I use Office 2003 SP3.
Please have a look attached sample.doc
Thanks,
Adam
Sample_33cbaf90.zip