Opening new word doc

  • Thread starter Thread starter m.cringle
  • Start date Start date
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?
 
objWord.Documents.Add ...

See Word VBA Help for different argument of the Add method.
 
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
 
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
 
Back
Top