G
Guest
I'm getting the following run-time error '-2147023174 (800706ba)'
Automation error, The RPC Server is unavailable
only about 50% of the time I run a Function that creates a Letter in Word
containing fields from Access, such as recipient address, subject matter etc.
I've tried different suggestions including a workaround in an MS article
about this error, but that's not working either. Any suggestions please? The
deadline for this is tomorrow and I desperately want to get it done.
Here are the first few lines and where the code breaks...
Function CreateInsLetter(icID As Integer)
Dim wdApp As Object, wdDoc As Object
Set wdApp = New Word.Application
Set wdDoc = New Word.Document
With wdDoc.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientPortrait
.LeftMargin = CentimetersToPoints(2.54) 'Breaks Here
Automation error, The RPC Server is unavailable
only about 50% of the time I run a Function that creates a Letter in Word
containing fields from Access, such as recipient address, subject matter etc.
I've tried different suggestions including a workaround in an MS article
about this error, but that's not working either. Any suggestions please? The
deadline for this is tomorrow and I desperately want to get it done.
Here are the first few lines and where the code breaks...
Function CreateInsLetter(icID As Integer)
Dim wdApp As Object, wdDoc As Object
Set wdApp = New Word.Application
Set wdDoc = New Word.Document
With wdDoc.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientPortrait
.LeftMargin = CentimetersToPoints(2.54) 'Breaks Here