PC Review


Reply
Thread Tools Rate Thread

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

 
 
Callum Davidson
Guest
Posts: n/a
 
      19th May 2011
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
 
Reply With Quote
 
 
 
 
David-W-Fenton
Guest
Posts: n/a
 
      21st May 2011
Callum Davidson <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> 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.

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysterious variable not defined error in Access 2007 hedgracer Microsoft Access 5 27th Jul 2010 10:17 PM
Error Message "Compile Error: Variable not defined" Keith Woollacott Microsoft Access Forms 2 7th Jun 2010 11:50 AM
Every time open word 2007 I get "Compile error in hidden module" Kevin K Microsoft Word Document Management 1 27th Jan 2009 02:33 AM
"Compile Error – Can’t find project or library" using Access 2007 R Marko Microsoft Access 1 5th Jan 2008 05:52 PM
Re: "Compile error: User-defined type not defined" ?? MacDermott Microsoft Access Form Coding 3 2nd Apr 2004 01:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:12 PM.