M
MaGi
Hi,
I try to automate WordXP from AccessXP (german version).
Most works fine, but when try to assign a style to a paragraph I get the
error 5946:
'NameLocal' is not a reference property. (in german: 'NameProperty' ist
keine Referenzeigenschaft.)
The source code in Access VBA is as following:
Dim objDoc As Word.Document, objWord As Word.Application, objRange As
Word.Range
Dim oParagr As Word.Paragraph, oStyle As Word.Style
....
Set objDoc = objWord.Documents.Add(Template:=gsGetTemplate, Visible:=True)
....
Set oParagr = objRange.Paragraphs.Add
oParagr.Range.Select
Set oStyle = objDoc.Styles("Standard")
Set oParagr.Range.Style = oStyle <---- here the error occurs
Please help me.
Thanks in advance
I try to automate WordXP from AccessXP (german version).
Most works fine, but when try to assign a style to a paragraph I get the
error 5946:
'NameLocal' is not a reference property. (in german: 'NameProperty' ist
keine Referenzeigenschaft.)
The source code in Access VBA is as following:
Dim objDoc As Word.Document, objWord As Word.Application, objRange As
Word.Range
Dim oParagr As Word.Paragraph, oStyle As Word.Style
....
Set objDoc = objWord.Documents.Add(Template:=gsGetTemplate, Visible:=True)
....
Set oParagr = objRange.Paragraphs.Add
oParagr.Range.Select
Set oStyle = objDoc.Styles("Standard")
Set oParagr.Range.Style = oStyle <---- here the error occurs
Please help me.
Thanks in advance