Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Dim Appword As word.application

Hi

I am using this daclaration in a program

"Dim Appword As word.application"

when i run my program i get this error assigned to this

"Compile error userdefined type not defined"

I know i have to do something but not sure what, any help greatly
received

Johny

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default Dim Appword As word.application

Use:

Set AppWord=CreateObject("Word.Application")

OR:

Add the Word object library reference to your project

" wrote:

Hi

I am using this daclaration in a program

"Dim Appword As word.application"

when i run my program i get this error assigned to this

"Compile error userdefined type not defined"

I know i have to do something but not sure what, any help greatly
received

Johny


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Dim Appword As word.application

Have you created a reference to the Word type library? Go to
ToolsReferences, scroll down to Microsoft Word, and check it.

--
HTH

Bob Phillips

wrote in message
oups.com...
Hi

I am using this daclaration in a program

"Dim Appword As word.application"

when i run my program i get this error assigned to this

"Compile error userdefined type not defined"

I know i have to do something but not sure what, any help greatly
received

Johny



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Dim Appword As word.application


"AA2e72E" wrote in message
...
Use:

Set AppWord=CreateObject("Word.Application")


You would also need

Dim AppWord As Object


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Dim Appword As word.application

Where would i use the Set appWord = CreateObject("Word.Application")
syntax


AA2e72E wrote:
Use:

Set AppWord=CreateObject("Word.Application")

OR:

Add the Word object library reference to your project

" wrote:

Hi

I am using this daclaration in a program

"Dim Appword As word.application"

when i run my program i get this error assigned to this

"Compile error userdefined type not defined"

I know i have to do something but not sure what, any help greatly
received

Johny





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Dim Appword As word.application

See
http://www.erlandsendata.no/english/...baoleolebasics
http://www.erlandsendata.no/english/...olecontrolword

HTH. Best wishes Harald

skrev i melding
ups.com...
Where would i use the Set appWord = CreateObject("Word.Application")
syntax



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Dim Appword As word.application

You would do that instead of

Set AppWord = New Word.Application

but note my other post.

--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
ups.com...
Where would i use the Set appWord = CreateObject("Word.Application")
syntax


AA2e72E wrote:
Use:

Set AppWord=CreateObject("Word.Application")

OR:

Add the Word object library reference to your project

" wrote:

Hi

I am using this daclaration in a program

"Dim Appword As word.application"

when i run my program i get this error assigned to this

"Compile error userdefined type not defined"

I know i have to do something but not sure what, any help greatly
received

Johny





  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Dim Appword As word.application

Why not spend a few minutes reading the "instructions" and save yourself
time spent struggling later:

As I previously posted:

Microsoft Office 2000 Automation Help File Available (Q260410)
http://support.microsoft.com/default...b;EN-US;260410

Microsoft Office XP Automation Help File Available (Q302460)
http://support.microsoft.com/default...b;EN-US;302460

--
Regards,
Tom Ogilvy



wrote in message
ups.com...
Where would i use the Set appWord = CreateObject("Word.Application")
syntax


AA2e72E wrote:
Use:

Set AppWord=CreateObject("Word.Application")

OR:

Add the Word object library reference to your project

" wrote:

Hi

I am using this daclaration in a program

"Dim Appword As word.application"

when i run my program i get this error assigned to this

"Compile error userdefined type not defined"

I know i have to do something but not sure what, any help greatly
received

Johny





  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Dim Appword As word.application

You need to set a reference to the Word object library. In VBA,
go to the Tools menu, choose References, and scroll down to
Microsoft Word. Check that box.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


wrote in message
oups.com...
Hi

I am using this daclaration in a program

"Dim Appword As word.application"

when i run my program i get this error assigned to this

"Compile error userdefined type not defined"

I know i have to do something but not sure what, any help
greatly
received

Johny



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read/write excel and word 2007 documents from another application mco3006 Excel Discussion (Misc queries) 0 April 27th 10 10:18 AM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM
Excel Versions and defineing word.application stevenmckeon[_6_] Excel Programming 1 August 4th 04 03:17 AM
Linked Excel Chart within hidden Word Application Visible Obi-Too Excel Programming 0 June 23rd 04 03:58 PM
Excel VBA, won't recognize "Word.Application" object Skyron Excel Programming 2 May 19th 04 08:48 PM


All times are GMT +1. The time now is 09:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"