[RESOLVED] How can I create a Word Document using VB/VBA?
Hi all,
I would like to create some blank word document. Is there any way to create a word document? We can create a text file using vb. Similarly I would like to create a Word document (should be blank) using VB.
Pls let me know your comments.
Thanks,
CS.
Re: How can I create a Word Document using VB/VBA?
Documents.Add
vba, will open a new document in word based on the normal template
Quote:
Syntax
expression.Add(Template, NewTemplate, DocumentType, Visible)
expression Required. An expression that returns a Documents object.
Template Optional Variant. The name of the template to be used for the new document. If this argument is omitted, the Normal template is used.
NewTemplate Optional Variant. True to open the document as a template. The default value is False.
DocumentType Optional Variant. Can be one of the following WdNewDocumentType constants: wdNewBlankDocument, wdNewEmailMessage, wdNewFrameset, or wdNewWebPage. The default constant is wdNewBlankDocument.
should also work from vb, by using the wordobjectprefix
pete