这是我的代码创建一个Word文档,使用VB6
有人可以张贴一些代码如何写一个文档与多个空白页。
Dim WordApp As Word.Application
Dim WordDoc As Word.Document
Set WordApp = New Word.Application
Set WordDoc = WordApp.Documents.Add
With WordApp.Selection
.InlineShapes.AddPicture "D:\tantan\FLOS\devil-may-cry-anime.jpg", False, True
.Hyperlinks.Add Anchor:=.Range, Address:="http://www.google.com/", SubAddress:="", TextToDisplay:="Google"
.Font.Bold = True
.TypeText "aaaa"
.Font.Bold = False
.TypeText "bbbb"
.TypeText vbNewLine
.Font.Italic = True
.TypeText "cccc"
.TypeText "dddd"
End With
WordDoc.SaveAs FileName:="D:\Samples\" & Text1.Text & ".doc"
WordDoc.Close False
WordApp.Quit False