Compile Error "Variable Not Defined" - Access 2007 - Word 2007

  • Thread starter Thread starter Callum Davidson
  • Start date Start date
C

Callum Davidson

Hi looking for help.

I'm merging data from Access 2007 with a Word Template 2007.

On this line I'm getting a "Variable Not Defined" "Compile Error"

Specifically at the wdFormatdoc bit.

wdTmp.SaveAs Left(strImage, Len(strImage) - 3) & "doc",
FileFormat:=wdFormatdoc

Anyone help me with a way around this problem?


Tx
 
I'm merging data from Access 2007 with a Word Template 2007.

On this line I'm getting a "Variable Not Defined" "Compile Error"

Specifically at the wdFormatdoc bit.

wdTmp.SaveAs Left(strImage, Len(strImage) - 3) & "doc",
FileFormat:=wdFormatdoc

Anyone help me with a way around this problem?

Does it tell you which variable is not defined?

If you're using late binding (and don't have a reference to Word
set), it would certainly be the case that the named constant
wdFormatdoc would not be defined.
 
Back
Top