|
-
Jun 14th, 2005, 08:54 AM
#1
Thread Starter
Frenzied Member
[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.
-
Jun 14th, 2005, 09:06 AM
#2
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
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|