I'm trying to get the number of attachements for a pdf file. I thought, based on forum posts, that
I could do something like this:
Code: Select all
public int GetAttachmentCount()
{
int nID = _Inst.Str2ID("op.attachments.modContents", false);
IOperation Op = _Inst.CreateOp(nID);
ICabNode input = Op.Params.Root["Input"];
input.Add().v = Doc;
ICabNode options = Op.Params.Root["Options"];
IPXC_NameTree Tree = Doc.CoreDoc.GetNameTree("EmbeddedFiles");
uint nAttachmentsCount = Tree.Count;
return (int)nAttachmentsCount;
}
How can I get the number of attachments?
Regards
Ronny