:::code language="csharp" source="./vsto/codesnippet/CSharp/Trin_VstcoreWordAutomationAddIn/ThisAddIn.cs" id="Snippet51"::: :::code language="vb" source="./vsto/codesnippet/VisualBasic/Trin_VstcoreWordAutomationAddIn/ThisAddIn.vb" id="Snippet51"::: The following code example can be used in a VSTO Add-in. :::code language="csharp" source="./vsto/codesnippet/CSharp/Trin_VstcoreWordAutomationCS/ThisDocument.cs" id="Snippet51"::: :::code language="vb" source="./vsto/codesnippet/VisualBasic/Trin_VstcoreWordAutomationVB/ThisDocument.vb" id="Snippet51"::: The following code example can be used in a document-level customization. Specify a range at the beginning of a document and insert the text New Text. Use the xref.Range.Text%2A property of a xref.Range object to insert text in a document. For more information, see Content controls and Bookmark control. You can also insert text into content controls and bookmarks. Use the xref.Selection.TypeText%2A method of a xref.Selection object to insert text at the cursor or selection. There are three primary ways to insert text into Microsoft Office Word documents: How to: Programmatically insert text into Word documents
0 Comments
Leave a Reply. |