Hi,
I have a word document that has attached(ie. embedded ) documents like word, ppt, pdf, etc.
I have to extract those embedded documents in the document through code.
To extract embedded word document. I used the following code.
word = new Microsoft.Office.Interop.Word.Application();
doc = word.Documents.Open(ref fileName, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
doc.Activate();
int attachmentsCount = doc.InlineShapes.Count;
for (int i = 0; i < attachmentsCount; i++)
{
embedDoc = doc.InlineShapes;
tempDoc = (Document)embedDoc.OLEFormat.Object;
tempDoc.SaveAs(ref tempFileName, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
}
I need help to extract other types of documents(generally all type of attachments).
Regards
Ayyanar