ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Dim Appword As word.application (https://www.excelbanter.com/excel-programming/321313-dim-appword-word-application.html)

[email protected]

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


AA2e72E

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



Bob Phillips[_7_]

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




Bob Phillips[_7_]

Dim Appword As word.application
 

"AA2e72E" wrote in message
...
Use:

Set AppWord=CreateObject("Word.Application")


You would also need

Dim AppWord As Object



[email protected]

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




Harald Staff

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




Bob Phillips[_6_]

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






Tom Ogilvy

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






Chip Pearson

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





All times are GMT +1. The time now is 03:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com