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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Unable to add text at a bookmark because the bookmark is missing the "End"

Thread ID:

Created:

Updated:

Platform:

Replies:

147714 Sep 20,2019 09:08 PM UTC Oct 4,2019 09:31 AM UTC WinForms 7
loading
Tags: DocIO
John Stemper
Asked On September 20, 2019 09:08 PM UTC

I am trying to insert text at a bookmark using the following code:

bookmarkNav.MoveToBookmark(bookmarkName)
bookmarkNav.InsertText(value, True)

This works fine for all the bookmarks except 1 specifically. When looking at the bookmarkNav values during debug it shows that the BookmarkEnd is null, the BookmarkStart is not null. 

When I try to do the InsertText I get a NullReferenceException.

SyncfusionDocIO.DLS.Bookmark.BookmarkEnd.get returned nothing.

Why would there be a valid start but no valid end? How can I deal with this short of modifying the document in Word first?(not an option for me)

Poorani Rajendran [Syncfusion]
Replied On September 23, 2019 09:37 AM UTC

Hi John,

Thank you for contacting Syncfusion support.

We have tried to reproduce the reported problem, but it works properly at our end. For your reference, we have attached the sample application which we tried at our end and it can be downloaded from the below link:
https://www.syncfusion.com/downloads/support/forum/147714/ze/CreateWordDocument2035447717

Note: Please find the input files in “Data” folder of above sample application.

We suspect that the problem might be due to the input Word document and code snippet used at your end. So, could you please share us the input Word document and complete code snippet with modified sample of above to reproduce the issue. Based on the details, we will check on your problem and will share you the solution at the earliest.

Please let us know if you have any other questions.

Regards,
Poorani Rajendran


John Stemper
Replied On September 23, 2019 03:23 PM UTC

I've attached an example of the document that does not work.
The bookmark in question is ADDR2 
It has a bookmark start but not a bookmark end. I believe it has something to do with the anchored text area next to it.

Poorani Rajendran [Syncfusion]
Replied On September 24, 2019 08:15 AM UTC

 Hi John,

Thank you for your update.

Regarding I've attached an example of the document:

We have not found any of your attachments in your previous update (Updated on 9/23/2019). Could you please re-upload the issue reproducing document. Thereby, we will check on your problem and will provide you the appropriate solution at the earliest.

Please let us know if you have any other questions.

Regards,
Poorani Rajendran
 


John Stemper
Replied On October 1, 2019 12:36 PM UTC

I've attached a valid word document that shows the problem described above.

Attachment: JCSIFC_7c60a0b2.zip

Poorani Rajendran [Syncfusion]
Replied On October 2, 2019 07:33 AM UTC

Hi John,

Thank you for your update.

We have tried to reproduce the reported problem with given input document, but it works properly at our end. For your reference, we have attached the sample application which we tried at our end and it can be downloaded from the below link:
https://www.syncfusion.com/downloads/support/forum/147714/ze/CreateWordDocument-1557976768

Note: Please find the input files in “Data” folder of above sample application.

We suspect that the problem might be due to the code snippet used at your end. So, could you please share us the modified sample application of above to reproduce the issue. Based on the details, we will check on your problem and will share you the solution at the earliest.

Please let us know if you have any other questions.

Regards,
Poorani Rajendran


John Stemper
Replied On October 3, 2019 02:22 PM UTC

The original sample file was incorrect. I've attached the correct sample file.
I have confirmed that using the sample code you provided this docx file does not work either.


Attachment: JCSIFC_840856a5.zip

Poorani Rajendran [Syncfusion]
Replied On October 4, 2019 09:31 AM UTC

Hi John,

Thank you for your update.

We have updated the details for your query in the support incident which has been created under your account to track the status of this issue. Please log on to our support website to check for further updates.
https://www.syncfusion.com/support/directtrac/incidents

Regards,
Poorani Rajendran

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon