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:
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
I'm waiting if there's news.
thanks.