Automate Word from Visual Basic .NET to Create a New Documenthttp://support.microsoft.com/?kbid=316383 oWord = CreateObject("Word.Application") //建立对像 oWord.Visible = True //可见 oDoc = oWord.Documents.Add 'Insert a paragraph at the beginning of the document. oPara1 = oDoc.Content.Paragraphs.Add oPara1.Range.Text = "Heading 1" //加内容。 oPara1.Range.Font.Bold = True 取出range 对像的text 就可以了
oWord.Visible = True //可见
oDoc = oWord.Documents.Add 'Insert a paragraph at the beginning of the document.
oPara1 = oDoc.Content.Paragraphs.Add
oPara1.Range.Text = "Heading 1" //加内容。
oPara1.Range.Font.Bold = True
取出range 对像的text 就可以了