Create a file in Microsoft Word through Visual Basic Coding
Create a file in Microsoft Word through Visual Basic Coding
Rate Create a file in Microsoft Word through Visual Basic Coding
(2(2 Vote))
Dim x As Word.Document
Dim i, s As Integer
Set x = New Word.Document
With x.ActiveWindow.Selection
.TypeText "This Document was Created Using VB6.0"
.TypeText "And Microsoft Office Automation"
.TypeParagraph
.TypeParagraph
.TypeText "This is Document " & Trim$(Str$(i)) & "of 10"
.TypeParagraph
.TypeParagraph
.TypeText "Have a Nice Day"
s = MsgBox("Word Document Created Successfully", vbInformation, "WD Created")
End With
With x
.SaveAs "C:\Visual Basic Created Me" & Trim$(Str$(i)) & "Times"
.Close
End With
Set x = Nothing
End Sub
Private Sub ext_Click()
End
End Sub
Create a file in Microsoft Word through Visual Basic Coding Comments
No comments yet — be the first to post one!
Post a Comment