You can also use an existing Word Template and create a new document based on that template. I use the folowing code for doing that.
---------------------------------------------------------
Dim objword as object
On Error Resume Next
'Look if there is also a word application open.
'If not create a new word object
Set objword = GetObject(, "Word.application"
'Create a new word object if already open.
If objword Is Nothing Then
Set objword = CreateObject("Word.application"
'When there is still nothing returned give an
'error message that word is not installed.
If objword Is Nothing Then
'Give error message and leave procedure or function
MsgBox "Word is not installed on this computer!", vbExclamation, "Error opening word!"
'Exit procedure or function
Exit Sub
End If
End If
'Put screenupdating off for faster writing to word
'remember to put it back on when finished writing to word.
objword.screenupdating = false
'Create a new template based on an existing word template.
objword.documents.add "path" & "template.dot"
'Do the code for writing to your document.
'Put screenupdating back on and refresh the word document
objword.screenupdating = true
objword.screenrefresh
'Free up memory declared to the word object
Set objword = nothing
-----------------------------------------------------------
I hope this is of some help for you.
Regards,
Irwo Kandziora
Omni Trade Automatisering B.V.
Netherlands
irwo@omni-trade.nl