使用C#编写Word文档时如何只出一个单词 [英] How to BOLD only one word when writing a Word doc using C#
问题描述
撰写Microsoft Word信函。 。 。
使用Word = Microsoft.Office.Interop.Word;
以下代码将BOLD句子。如何指定仅包含一个单词的范围。 。 。假设你想在句子或段落中以电子方式加粗单词。 。 。你会如何指定范围。我已经阅读了帮助信息,但找不到任何示例。
Word.Paragraph oPara1;
oPara1.Range.Font.Bold = 1;
oPara1.Range.Text =我们将以IRS电子方式提交您的2013年联邦个人所得税申报表。;
这 [ ^ ]应该有所帮助。
[请鼓励参与投票的解决方案或适合您的答案]
Writing a Microsoft Word letter . . .
using Word = Microsoft.Office.Interop.Word;
The following code will BOLD the sentence. How do you specify a range that includes only one word . . . say you want to bold only the word electronically in the sentence or paragraph . . . how would you specify the range. I've read info in help but cannot find any examples.
Word.Paragraph oPara1;
oPara1.Range.Font.Bold = 1;
oPara1.Range.Text = "We will file your 2013 Federal Individual Income Tax Return electronically with the IRS.";
This[^] should help.
[Please encourage participation by up-voting solutions or answers that work for you]
这篇关于使用C#编写Word文档时如何只出一个单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!