Add image caption without number

Is it possible to add an image caption that does not include the automatic numbering? I'm currently using the following code: 

IWPicture image = paragraph.AppendPicture(some image source);

var caption = image.AddCaption("Figure", CaptionNumberingFormat.Number, CaptionPosition.AfterImage) as WParagraph;


I would like to continue to specify the caption location and the caption text, but to exclude the 


1 Reply

DS Dharanya Sakthivel Syncfusion Team July 30, 2024 04:43 PM UTC

Hi Natalie,

Based on the information provided, we found that your requirement is to add image captions without including number. To meet your requirement, we have prepared and attached a sample in the below attachment.

In the attached sample, we have done the following things:
1. Create word document and Append a Table of Contents (TOC).
2. Disable UseHeadingStyles and set TableOfFiguresLabel
3. Add image and include caption
4. By iterating the caption paragraph child entities, find the seqField then enable HideResult to hide the caption sequence number.
5. Update Document Fields and the Table of Contents.
6. Save the Document.

Kindly refer the below documentation
Working-with-table-of-contents

Regards,
Dharanya.


Attachment: Imagecaptionwithoutnumber_df063e2d.zip

Loader.
Up arrow icon