Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel and Word


Bonjour,

Hi,

I was trying to export data from Excel to Word and

1) I have set a reference to Microsoft Word 11.0 Object Library in VBA

2) The begining of the code is

Dim appWrd As Object
Set appWrd = CreateObject("Word.Document")

But HERE when I test, I have a message saying

Err -2147221231
Err Automation
ClassFactory can't provide the requested class

(free translation of the original message in french)

AND I DO NOT UNDERSTAND WHY

THANKS IN ADVANCE FOR YOUR HELP / SUPPORT :cool

--
freddybe
-----------------------------------------------------------------------
freddybee's Profile: http://www.excelforum.com/member.php...fo&userid=1598
View this thread: http://www.excelforum.com/showthread.php?threadid=27453

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default Excel and Word

freddybee

Change "Word.Document" to "Word.Application"

If you then want to get to a document, you can

Dim doc as Object

Set doc = appWrd.Documents.Open(...)

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"freddybee" wrote in message
...

Bonjour,

Hi,

I was trying to export data from Excel to Word and

1) I have set a reference to Microsoft Word 11.0 Object Library in VBA

2) The begining of the code is

Dim appWrd As Object
Set appWrd = CreateObject("Word.Document")

But HERE when I test, I have a message saying

Err -2147221231
Err Automation
ClassFactory can't provide the requested class

(free translation of the original message in french)

AND I DO NOT UNDERSTAND WHY

THANKS IN ADVANCE FOR YOUR HELP / SUPPORT


--
freddybee
------------------------------------------------------------------------
freddybee's Profile:

http://www.excelforum.com/member.php...o&userid=15984
View this thread: http://www.excelforum.com/showthread...hreadid=274537



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
Need Excel count of 1 word if found in multi-word cells of column Function_Challenged Excel Worksheet Functions 1 August 27th 09 12:08 AM
Excel 7, paste linked to word becomes black when word pdf'd Surffreak Excel Discussion (Misc queries) 0 June 1st 08 12:17 AM
Copy from Word to Excel, and retain indent, plus word wrap Eric Excel Discussion (Misc queries) 1 March 9th 07 03:15 AM
Print labels by using Excel data in a Word mail into word Zoey Excel Discussion (Misc queries) 1 November 1st 05 09:08 PM
Printing Word Document using Excel Programming hangs Word Alan Excel Programming 0 September 30th 04 08:41 PM


All times are GMT +1. The time now is 12:36 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"