Hi list,
following code works fine for 2003, but in 2000 i get "Object reference not
set" for line "SaveAs":
Dim oDoc As New Word.Document
Dim opara1 As Word.Paragraph
Dim oword As New Word.Application
oword.Visible = True
oword.Options.TabIndentKey = False
oword.CommandBars("Mail Merge").Visible = False
For i = 1 To 3
oDoc = oword.Documents.Add()
opara1 = oDoc.Content.Paragraphs.Add
opara1.Range.Text = "Dikke leendert"
opara1.Range.Font.Bold = True
opara1.Range.InsertParagraphAfter()
Next
Dim oDc As Word.Document
i = 0
For Each oDc In oword.Documents
i += 1
oDc.SaveAs("c:\d" & i & ".doc") 'Works fine in 2003, not in 2000
Next
''When I try to do the following in the for...next, same problem
odc.activate
oword.activedocument.SaveAs("c:\..") same problem...
Hopefully someone can help..
Thanks,
Albert