Replace bookmark with document

I have a bug with this code (attach in mail). I have a bookmark, before the bookmark there is a character " and after the bookmark there is a character " (for example: “[bk1]”). The output is not ok because the result is:
“” (Document content)
And the good output should be:
" (Document content) "
I attach de document with the bookmarks and source code (in previous post you give this code) because I don’t find the bug in this code.
Thanks for all.
Best regards,

Thanks for your request. Please try using the method provided here to insert one document into another at bookmark:
Hope this helps.
Best regards,

thanks for this code but I have the same problem.
The output is:
“” (Content document)
And should be:
" (Content document) "
I think that the problem is when I delete bookmark then content document always put after double ".
Best regards,

Thanks for your request. Here is code I used for testing:

' Open template ans source docuemtn that we need to insert into the bookmark.
Dim doc As New Document("C:\Temp\1.docx")
Dim srcDoc As New Document("C:\Temp\src.doc")

' Insert source document into a bookmark.
Dim bkName As String = "DOC__OTRDOC__DOC_C_1"

' Remove old content of the bookamrk first.
doc.Range.Bookmarks(bkName).Text = ""
InsertDocumentAtBookmark(bkName, doc, srcDoc)

' Remove bookmark.

' Save the result

As I can see content of the source document is properly inserted. Hope this helps.
Best regards,

thanks for this code but the output is wrong too.
In this case the output is…
(Content document) “”
Should be…
" (Content document) "
Best regards,

Thank you for additional information. I double check on my side and output is correct, i.e. the source document is inserted just between quotes. Could you please attach your template and document you would like to insert? I will check again on my side and provide you more information. Also, you can create a simple application that will allow me to reproduce the problem.
Best regards,

The issues you have found earlier (filed as WORDSNET-5251) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.