Hi,
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your inquiry. You need to use MoveToBookmark() method to move cursor to desired bookmark and then InsertHtml() method for inserting html. Please refer to the following articles for further details. Hopefully it will serve the purpose.
http://www.aspose.com/docs/display/wordsnet/MoveToBookmark+Method
http://www.aspose.com/docs/display/wordsnet/Inserting+Document+Elements
Please feel free to contact us for any further assitacne.
Best Regards,
I tried this method and it replaced bookmark with this
Admission
Information:
Admission:
05/24/2012
Discharge:
05/25/2012Provider
Information:
MD
No: 443-287-3127
Care Provider:
Christine Fleurimond, MD
Provider Tel No: 410-383-8300Medications
(Verify medication names with your
Pharmacist)
mouth.
Sulfate 325 mg With meals By
mouth.
dailyDischarge Patient
To:Appointments:
Name: Total Healthcare Division StreetDischarge
Diets:
RegularDischarge
Activities/Restrictions:
as toleratedOther
Issues:
MEMBER OF THE<o:p></o:p>
HOSPITALIST TEAM FOLLOWING YOUR DISCHARGE TO CLARIFY YOUR POST-DISCHARGE
PLANS, MEDICATIONS OR TREATMENTS, PLEASE CALL MAGGIE NEELY (CASE MANAGER)
AT 410-502-5302. IF YOU NEED HELP DURING NON-BUSINESS HOURS, CALL THE
HOSPITALIST UNIT FRONT DESK AT 443-287-3127. IF IT IS AN EMERGENCY, CALL
911.
<span style=“font-size:16.0pt;line-height:115%;font-family:“Calibri”,“sans-serif”;
mso-fareast-font-family:“Times New Roman”;mso-bidi-font-family:Calibri;
position:relative;top:-.5pt;mso-text-raise:.5pt;mso-ansi-language:EN-US;
mso-fareast-language:EN-US;mso-bidi-language:AR-SA”>YOU, WHEN YOU GO IN TO SEE
YOUR PRIMARY DOCTOR.
Authored/Entered By:
Williams, Lisa © Entered On 2012-05-25
12:41
-
Authored/Entered By:
Williams, Lisa © Entered On 2012-05-25
12:41 -
Last Edited/Revised By: Reiss
Binder, Kim (MD) Entered On 2012-05-25 15:52
mso-fareast-font-family:“Times New Roman”;mso-bidi-font-family:Calibri;
position:relative;top:-.5pt;mso-text-raise:.5pt;mso-ansi-language:EN-US;
mso-fareast-language:EN-US;mso-bidi-language:AR-SA”>
mso-fareast-font-family:“Times New Roman”;mso-bidi-font-family:Calibri;
position:relative;top:-.5pt;mso-text-raise:.5pt;mso-ansi-language:EN-US;
mso-fareast-language:EN-US;mso-bidi-language:AR-SA”>
mso-fareast-font-family:“Times New Roman”;mso-bidi-font-family:Calibri;
position:relative;top:-.5pt;mso-text-raise:.5pt;mso-ansi-language:EN-US;
mso-fareast-language:EN-US;mso-bidi-language:AR-SA”>I need formatted html dont want to show the tags on the doucment. Hope I get a solution asap.
mso-fareast-font-family:“Times New Roman”;mso-bidi-font-family:Calibri;
position:relative;top:-.5pt;mso-text-raise:.5pt;mso-ansi-language:EN-US;
mso-fareast-language:EN-US;mso-bidi-language:AR-SA”>
mso-fareast-font-family:“Times New Roman”;mso-bidi-font-family:Calibri;
position:relative;top:-.5pt;mso-text-raise:.5pt;mso-ansi-language:EN-US;
mso-fareast-language:EN-US;mso-bidi-language:AR-SA”>Thanks
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your inquiry. Please check following code snippet, for moving cursor to a specific bookmark and to insert formatted html. Hopefully it will serve the purpose.
Document doc = new Document(MyDir+"bookmarktest.doc");
DocumentBuilder builder= new DocumentBuilder(doc);
builder.MoveToBookmark("bm_1",true,false);
builder.InsertHtml("Admission Information:
Provider Information:
);
doc.Save(MyDir+"out.doc");
Please feel free to contact us for any further assistance.
Best Regards,
The string is coming from FreeRichText box .
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your inquiry. Could you please share your sample working solution? So we will have a close look into it and suggest you solution accordingly.
Please feel free to contact us for any further assistance.
Best Regards,
Hi Tilal,
Hi Sreejesh,
Thanks for your inquiry.
The Bookmark.Text property gets the text
enclosed in the bookmark without formatting. If you want to get the
formatted text inside a bookmark, please extract the content from a bookmark using the code shared in following documentation link:
http://www.aspose.com/docs/display/wordsnet/Extract+Content+from+a+Bookmark
In your case, you need to use MoveToBookmark method to move cursor to desired bookmark and use InsertDocument method to insert the extracted contents to bookmark. Please check the code of InsertDocument method from here:
http://www.aspose.com/docs/display/wordsnet/How+to++Insert+a+Document+into+another+Document
Hope this answers your query. Please let us know if you have any more queries.
Hi,
Document wordDoc = new Document(MyDir + "TestResearch_T_F.docx");
var bookmark = wordDoc.Range.Bookmarks["bmkDocAuthor"];
wordDoc.Range.Bookmarks[bookmark.Name].Text = string.Empty;
var documentBuilder = new Aspose.Words.DocumentBuilder(wordDoc);
documentBuilder.MoveToBookmark(bookmark.Name, true, false);
documentBuilder.InsertHtml("new text");
wordDoc.Save(MyDir + "Out.docx");
Hi,
Document wordDoc = new Document(MyDir + "SampleTemplate.docx");
var bookmark = wordDoc.Range.Bookmarks["bmkSupportingAnalysis"];
var documentBuilder = new Aspose.Words.DocumentBuilder(wordDoc);
if(bookmark.BookmarkStart.NextSibling.NodeType == NodeType.EditableRangeStart)
{
EditableRangeStart ers = (EditableRangeStart)bookmark.BookmarkStart.NextSibling;
documentBuilder.MoveTo(ers.EditableRange.EditableRangeEnd);
}
documentBuilder.InsertHtml("new text");
wordDoc.Save(MyDir + "Out.docx");
Hi Tahir,