I was adding an image like this in word → insert → Quick Parts → field→ “IncludePicture” → with the option “\d” functionality.
How can I capture this data in my C# code?
Screenshot reference:
@kaushlendu.choudhary INCLUDEPICTURE
fields are read as Shape
nodes. You can use ImageData.IsLinkOnly
to check whether the picture is linked:
Document doc = new Document(@"C:\Temp\in.docx");
Shape s = (Shape)doc.GetChild(NodeType.Shape, 0, true);
Console.WriteLine(s.ImageData.IsLinkOnly);