I am opening a Word 2010 document, filling in selected bookmarks, saving as RTF and then opening this document to export to PDF and have the following issues:
- The RTF document does not contain an image that is embedded in the source DOCX document.
- The PDF document does not contain header and footer text that appear in the DOCX and RTF documents.
- Is there a code example of inserting an image into a location in the document defined by a bookmark? The following code nearly works perfectly but it requires an extra carriage return after the bookmark otherwise the image appears after the text on the following line:
Dim myDocument As New ComponentPro.Word.WordDocument
Dim myBookmarks As ComponentPro.Word.BookmarksNavigator
myBookmarks = New ComponentPro.Word.BookmarksNavigator(myDocument)
Dim myParagraph As ComponentPro.Word.Paragraph = myBookmark.BookmarkStart.OwnerParagraph
Dim signatureImage As Image = System.Drawing.Image.FromFile("Path+File")
Dim myPicture As ComponentPro.Word.Picture
myPicture = myParagraph.AppendPicture(signatureImage)