We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Document.Bookmarks.FindByName works, but initially Document.Bookmakrs.Count is 0

Thread ID:

Created:

Updated:

Platform:

Replies:

131883 Aug 1,2017 12:26 PM Aug 7,2017 01:05 AM ASP.NET Web Forms 5
loading
Tags: DocIO
Carl Heavisides
Asked On August 1, 2017 12:26 PM

Hi,

I'm using bookmarks as kind of placeholder, but I want to remove them all after I'm done with the document.

I tried document.Bookmarks.Clear() then tried while(document.Bookmarks.Count > 0) document.Bookmarks.RemoveAt(0);

but then I realised it does not seem to actually load in the bookmarks initially... the count is always 0 - is there some sort of document.Bookmarks.Init() or something to fill the bookmark collection? Or perhaps something that could be done in the WordDocument() Constructor?

Cheers,
Carl.

Ramanan  Hariharasubramanian [Syncfusion]
Replied On August 2, 2017 05:36 AM

Hi Carl,

Thank you for contacting Syncfusion support.

We are unable to reproduce the reported issue from our side. We have prepared a sample based on your requirement which can downloaded from the following link.

Sample link: http://www.syncfusion.com/downloads/support/forum/131883/ze/Sample1108399142

Kindly modify this sample to reproduce the issue and share us the issue reproducing sample along with input document which will be helpful for us to provide you a prompt solution at the earliest.

Please let us know if you have any concerns.


Regards,
Ramanan H.

 


Carl Heavisides
Replied On August 3, 2017 10:32 AM

Hi Ramanan,

Thanks for that sample to work with (makes things easier)

It does seem to be a specific problem after a mailmerge

I've attached an updated sample and you'll see that after you click "Generate Document" the delivered document still has the bookmarks - and if you debug through you'll see after the mail merge the document.Bookmarks collection has been emptied.

Cheers,

Carl.


Attachment: bookmarkissue_dabd34b7.zip

Sethumanikkam Yogendran [Syncfusion]
Replied On August 4, 2017 05:55 AM

Hi Carl,

Thank you for your update.

We are glad to inform you that the reported issue has been already fixed and the fix already included in our 2017 Volume 3 release which is expected to be out by this week.

Please let us know if you have any other questions.

Regards,
Sethumanikkam.Y


Carl Heavisides
Replied On August 4, 2017 06:26 AM

that's great, thanks!

Carl.


Ramanan  Hariharasubramanian [Syncfusion]
Replied On August 7, 2017 01:05 AM

Hi Carl,

Thanks for your update.

Please let us know if you have any other questions.

Regards,
Ramanan H.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;