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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Can i put file in bookmark

Thread ID:

Created:

Updated:

Platform:

Replies:

141483 Dec 13,2018 03:11 PM UTC Dec 19,2018 01:11 PM UTC WinForms 3
loading
Tags: DocIO
AAYADI
Asked On December 13, 2018 04:39 PM UTC

hey,
i want to change content of my bookmark with file .doc or .xls or pdf
it's possible and how can i do ?

and the second think how can i add document in a specific location?


Dilli Babu Nandha Gopal [Syncfusion]
Replied On December 14, 2018 04:51 PM UTC

Hi AAYADI, 

Greetings from Syncfusion. 
 
Regarding modifying bookmark in a document: 
Please find the documentation links illustrates working with bookmark in a document. 
DocIO: 
PDF: 
XlsIO: 
Microsoft Excel itself does not have support for bookmarks. So, bookmarks support is not in XlsIO.  

Regarding adding a document in a specific location: 
The following code example illustrates how to replace a particular text with a Word document. 
//Loads a template document 
WordDocument document = new WordDocument("SourceTemplate.docx", FormatType.Docx); 
 
//Gets the document to replace the text 
IWordDocument replaceDocument = new WordDocument("Template.docx"); 
 
//Replaces a particular text with another document 
document.Replace("paragraph", replaceDocument, false, true, true); 
 
//Saves and closes the document 
document.Save("Sample.docx", FormatType.Docx); 
 
document.Close(); 

To know more about this, kindly refer the following UG documentation. 

Regards, 
Dilli babu. 


AAYADI
Replied On December 14, 2018 05:01 PM UTC

thanks for answer, i found the solution with replace. :)
but the solution is not working with my document (if i have a bookmarks without  content) => I post the question in the incident.

i need an important think ,
how can i add paragraph or some think in a specific place of document without creating a section.
thanks.

Dilli Babu Nandha Gopal [Syncfusion]
Replied On December 19, 2018 01:11 PM UTC

  
Hi Aayadi, 

On further analyzing in depth with the input Word document, we have found that the bookmark is preserved inside the “SET” field. As per Microsoft Word application behavior, SET field doesn’t preserves the field result in the appearance. So, the inserted bookmark contents not preserved in your input Word document while inserting contents using DocIO. 

If your requirement to insert a bookmark contents in the Word document means, we suggest you to set bookmark in the Word document and insert the contents as per the below UG documentation: 

Regards, 
Dilli babu 


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

;