Opening new word doc

M

m.cringle

I have used the following code to open Microsoft Word

Private Sub Word_Document_Click()
Dim objWord As Word.Application
Set objWord = New Word.Application
objWord.Visible = True
End Sub

I know how to open an existing document:

objWord.Documents.Open "S:\Competitor Analysis DB\CA Database\User
Guides\Competitor Analysis Database User Guide (Inputs).doc", , , True

However, I'm not sure what I need to add to open a new document within
Word.

Can anyone help?
 
V

Van T. Dinh

objWord.Documents.Add ...

See Word VBA Help for different argument of the Add method.
 
T

Terry Kreft

There is a really easy way to find out how to do this sort of thing.

Open word
Record a macro doing what you want to do
Look at the code Word generates
 
M

m.cringle

Terry said:
There is a really easy way to find out how to do this sort of thing.

Open word
Record a macro doing what you want to do
Look at the code Word generates
Ah, never considered that! Good idea, thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top