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. Image for the cookie policy date

Replace bookmark in field and save in .doc

Hi,
during my study of the librairy that has not finished yet.
I have a bookmark that contains a field and I want replace the content and save the document in .doc format
but the result contains ?? which is not desired.

the code:
          bknav.MoveToBookmark("titreAmiante")
  bknav.ReplaceBookmarkContent("Ceci est un titre aaaa bbbb cccc", True)
a.Bookmarks.Remove(bknav.CurrentBookmark)

the result:

Attachment: Sample_833a5c0f.zip

8 Replies

AT AtliDev February 28, 2019 11:00 AM UTC

Hi,

the problem if i change the saveformating of ReplaceBookmarkContent on false it's work, but it's not the desired result.

thanks


MJ Mohanaselvam Jothi Syncfusion Team March 1, 2019 01:04 PM UTC

Hi AtliDev,

Thank you for contacting Syncfusion support.

We have tried to reproduce the reported problem using the given details, but we are unable to reproduce the problem at our end. For your reference, we have attached the sample application which we tried at our end and also the output document generated at our end.

Sample link:
http://www.syncfusion.com/downloads/support/forum/143006/ze/GenerateWord_Windows-1845942444

Output document:
http://www.syncfusion.com/downloads/support/forum/143006/ze/Output-1477137880

We suspect that the issue might be due to the code snippets used in your sample application. Could you please share us the modified sample of above along with the complete code snippet and the Syncfusion product version used at your end. Thereby, we will check to reproduce the reported problem and provide you the appropriate solution at the earliest.

Please let us know if you have any other questions

Regards,
Mohanaselvam J 



AT AtliDev March 1, 2019 01:26 PM UTC

Hi,

thanks for the answer,

i execute your code but i have no result in the out document, it's an other problem ??

this is the code that i use :

Dim a As New WordDocument(chemin + "\testword\etpdp.doc")

Dim bknav As BookmarksNavigator = New BookmarksNavigator(a)

bknav.MoveToBookmark("titreAmiante")

bknav.ReplaceBookmarkContent("Ceci est un titre aaaa bbbb cccc", True)
a.Bookmarks.Remove(bknav.CurrentBookmark)

a.Save(chemin + "\testword\mehdi.doc", FormatType.Doc)

Process.Start(chemin + "\testword\mehdi.doc")
a.Close()

The input document is in the Attach file .

Thanks


Attachment: etpdp__x_375c843f.zip


DB Dilli Babu Nandha Gopal Syncfusion Team March 4, 2019 04:53 PM UTC

Hi AtliDev, 
 
Thank you for your update. 
 
We can reproduce the reported issue (mentioned on 2/28/2019) and the empty document problem from our side. We suspect this could be a defect and analyzing on it. We will update you further details on 6 March 2019. 
  
Regards, 
Dilli babu. 
 
 



AT AtliDev March 6, 2019 08:10 AM UTC

Hi,
I'm waiting if there's news.

thanks.



DB Dilli Babu Nandha Gopal Syncfusion Team March 6, 2019 06:08 PM UTC

Hi AtliDev, 

We have confirmed that the reported issues are defects. The issue fixes for these defects will be included in our 2019 Volume 1 SP1 which is estimated to be available by April 2019 tentatively.  

Regards, 
Dilli babu. 



AT AtliDev April 4, 2019 02:29 PM UTC

Hello,

I saw  in your last release some fix of bug but not this one
it will be fix in april or not yet ?
thanks and have a good day.

thanks


AV Abirami Varadharajan Syncfusion Team April 5, 2019 04:32 AM UTC

Hi AtliDev, 

As promised earlier, the issues reported in this incident will be included in our upcoming release version 17.1 SP – 1 which will be available by mid of May 2019. 

Regards, 
Abirami 


Loader.
Live Chat Icon For mobile
Up arrow icon