Results 1 to 10 of 10
  1. #1
    New Lounger
    Join Date
    Dec 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access / Word 2003 Error (2003)

    Has anyone had any problems with inter-office automation between MS Word and MS Access in Office 2003?

    I have recently installed office 2003 in a new folder and have left the older office 2000 and office XP components installed. ie I have word/access/excel 2k/xp/2003 installed. I tried to do a usual access 2k to word 2k automation yet I get the error "Automation Error" "ClassFactory cannot supply requested class". So thinking it is a new office install problem I tried with Access 2003 and Word 2003 and the same problem. BTW I have selected Word 11.0 Object Library in the references both times.

    So does anyone have any ideas?

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Access / Word 2003 Error (2003)

    Well for starters, if you are working with Word 2000 and Access 2000, you should be using the Word 9.0 Object Library reference in your Access VBA. (The 11.0 version would be correct for 2003) But it sounds like something in the install is probably not correct with Office 2003 - unfortunately there isn't lots of field experience yet to lean on in trying to debug the problem. Perhaps it would help if you gave us a bit more detail on what the task is that you are trying to automate.
    Wendell

  3. #3
    New Lounger
    Join Date
    Dec 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access / Word 2003 Error (2003)

    Sorry for the delay in replying; holidays and the like, you know. [img]/forums/images/smilies/smile.gif[/img]

    Yes, I've tried the corresponding object library with each version of office, so thanks for that check. I've tried a repair of Office 2003 and also a re-register of Word 2003 resources, yet to no help. The most basic task I'm trying to do is use the wizard to create the code to open Word from Access. I can't get any further than that.

    Now I can't remember if I put some example code in my first reply, yet as soon as the code tries to reference the Word object, I get the error message. By going step by step and looking at the variable wdApp as Word.Application, the Word object seems to never get created most of the time. ie move the mouse over the variable is it pops up either "Nothing" or stays blank.

    For a final thought, which I think is related somehow. My work had a problem that some of it computers wouldn't run MS Access 2000 anymore. I came across an MS article the other day about library reference problems with Excel 95 and future versions of Excel. Now while the computers have never had Office 95, I tried their recommended fix and it worked. The bottom line that I'm giving thought to, is that of have I reached the limit of installed versions of office (97, 2000, xp and 2003)? Has anyone else been able to install this many versions and been problem free?

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Access / Word 2003 Error (2003)

    Your initial post indicated that you had only three versions (2000,2002,2003) but you now indicate that you have 97 as well. I have had problems with 97 and 2000 coexisting in the past, so I either put them on separate PCs, or at least in separate partitions. But I read regularly of people having at least 3 versions, and in general they coexist - though not many try to do automation tasks in that environment. One possibility that's a long shot is that you don't have the right Microsoft Office xx Library that you need in order to use Automation. I would guess however that it is more likely that you have a rogue DLL or OCX somewhere that is causing you grief. And those problems are generally a bear to chase down, so I avoid them if at all possible.

    Hopefully someone else can provide more experience with multiple versions installed - there is <!mskb=290576>Microsoft Knowledge Base Article 290576<!/mskb> for Office 2002 that describes the best way to go about that, but we've become fans of the VirtualPC product which lets you run multiple combinations of Windows and Office each in their own space.
    Wendell

  5. #5
    New Lounger
    Join Date
    Dec 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access / Word 2003 Error (2003)

    RE: Office versions. Sorry about that, I was concentrating on the problem, not explaining the full environment it was in. As far as multiple versions, I've also had no problems with 97, 2000 and XP running on the same machine and in the same partition using automation between Access, Excel and Word. Even to the point of automating Word & Excel XP Libraries form Access 97. So I was surprised when that all stopped with 2003.

    Rogue DLL or OCX...? Yes, that would be difficult. I've tested creating a brand new Access 2003 file and with nothing else but a new blank form. The form has two buttons created from the Access Wizard, one opening a Word Object and the other opening an Excel Object. The Excel opens Excel 2003 fine, yet the Word one has the Error.

    Microsoft Knowledge Base Article 290576... Yes I've seen this and followed it when I installed Office XP. Luckily everything worked so I thought I must have got something right. [img]/forums/images/smilies/smile.gif[/img]

    Which virtual PC product are you a fan of? I know of a few, yet I haven't needed such a product as I've not had a problem with multiple versions of Office or other applications co-existing. Therefore the price seemed unjustifiable.

  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Access / Word 2003 Error (2003)

    I was referring to the Microsoft version, which they purchased from Connectix a few months ago. The marketing stuff can be found at http://www.microsoft.com/windowsxp/virtualpc/. I don't know of any reported problems, but <!mskb=825796>Microsoft Knowledge Base Article 825796<!/mskb> shows the references you need to set when using Automation from Access (if you haven't already found it). You might also look at <!mskb=288902>Microsoft Knowledge Base Article 288902<!/mskb> and <!mskb=828550>Microsoft Knowledge Base Article 828550<!/mskb>. BTW, does the error you get have an error number - that sometimes helps in chasing these things down.
    Wendell

  7. #7
    New Lounger
    Join Date
    Dec 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access / Word 2003 Error (2003)

    Thanks for the links. The "Microsoft Knowledge Base Article 825796" was a good one yet I'm still within its guidelines and still I get the error. The full error is
    "-2147221231 ClassFactory cannot supply requested class".

    I need it to work now, so I'm left with no other option than to uninstall all the versions of office and re-install and active them again...groan.

  8. #8
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access / Word 2003 Error (2003)

    I suspect you may be running into problems with wdApp as Word.Application because with multiple instances of Word on the computer, you may be trying to mix them without intending to. Without specifying a particular version of Word, you're likely to get the last one used, or at least that's the way Office has worked in the past.
    Charlotte

  9. #9
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access / Word 2003 Error (2003)

    As you can see in a different post (which I should really erase) I have this issue also. In my references, I can only reference Word 11 i.e. 2003. There is no reference for earlier Words that are installed. So I do not understand why at least it does not use Word 11 which is checked in the reference dialog.
    However, how do I force VBA to use a specific Word?
    Thanks

  10. #10
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access / Word 2003 Error (2003)

    If you only have a single version of Word installed, then that's the only version it *can* use. However, if you're trying to communicate with an earlier version of Access, you may still run into problems because of the significant differences introduced in Word 2003.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •