Re: Filling Word Form from Access

Tech-Archive recommends: Fix windows errors by optimizing your registry



Ok, let's bring in some phasing and see what problems

If you were to skip using the active instance of Word (the GetObject instantiating) and use
a brand new instance of Word

Replace this
Set appWord = GetObject(, "Word.application")
If Err = 429 Then
Set appWord = New Word.Application
Err = 0
End If
With appWord
On Error GoTo ErrorHandler
Set doc = .Documents.Open(DOC_PATH & DOC_NAME, , True)

by
Set appWord = New Word.Application
With appWord
On Error GoTo ErrorHandler
Set doc = .Documents.Open(DOC_PATH & DOC_NAME, , True)
'...etc
End With

Is wdApp instantiated and can you get object variable "doc" instantiated as well ...?

--
Krgrds,
Perry

System: Vista/Office Ultimate
<fmackay@xxxxxxxxxxx> wrote in message news:1170842740.470475.180450@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On 6 Feb, 23:11, "Perry" <drum...@xxxxxxxxx> wrote:
Go into VBE and check menu: Tools | References
whether there are libraries reported "MISSING" in the references.
Write them down somewhere ... (or make a screendump)
Uncheck these missing references, validate the dialog and retry.

If this doesn't work, bring up the very same reference dialog, and from the
note that you made (or the screendump), look for a more recent version.

Kindly repost if this doesn't work.

Hi,

There are no missing libraries, and the same ones are checked on both
machines. Although I suppose I can't assume the libs are identical
despite them having the same names; I can see 6 different libs all
calling themselves "Visual Basic for Applications" after all (it
appears I am using the same one of these on both machines though)

cheers,

Finlay


.



Relevant Pages

  • Re: Filling Word Form from Access
    ... whether there are libraries reported "MISSING" in the references. ... Uncheck these missing references, ... note that you made (or the screendump), look for a more recent version. ... Set appWord = New Word.Application ...
    (microsoft.public.office.developer.vba)
  • Re: Filling Word Form from Access
    ... Uncheck these missing references, ... note that you made (or the screendump), look for a more recent version. ... Although I suppose I can't assume the libs are identical ...
    (microsoft.public.office.developer.vba)
  • Re: MS Engineers: Word 2003 Find/Change Automation from Excel 2003
    ... Thanks, Tony, for replying. ... All my references are correct. ... The search and replace is used to format the ... Set appWord = New Word.Application ...
    (microsoft.public.word.vba.general)