I have some word documents with objects inside them. I am testing one that has 3 pdf-files (the wordApp.Selection.InlineShapes.Count matches this), But else I have trouble getting any info from the objects. How do I save it to a disk? Any help is appreciated, because the inlineShape.OLEFormat.IconLabel is an empty string in all 3 instances.
var wordApp = new Word.Application();
object confirmConversions = false;
object readOnly = true;
object missing = Type.Missing;
this.document = wordApp.Documents.Open(
ref fn, ref confirmConversions, ref readOnly,
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);
string applicationName = null;
foreach (Microsoft.Office.Interop.Word.InlineShape inlineShape in this.document.InlineShapes)
{
applicationName = inlineShape.OLEFormat.IconLabel;
}
If you are open to using 3rd party controls, this can be easily accomplished using Aspose.Words: