Results 1 to 7 of 7
  1. #1
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Word 2003 and Norton Auntie Virus 2004 (Word 2003)

    Using either of the subs below, I am unable to create a Word object and get the
    same error message in both cases.
    I know that I ran analogous code successfully on 22 July 2004, with NAV 2003.

    As far as I know, the only software installed since then was NAV 2004 on 24 August 2004.

    Does anybody with Office 2003 and NAV 2004 see the same error?
    Problem does not occur, on another systetm, with Office 2002 and NAV 2003.

    <pre>Option Explicit

    Private Sub CreateWordObjectUsingNew()
    Dim appWord As Word.Application

    On Error Resume Next
    Set appWord = New Word.Application
    If Err.Number <> 0 Then
    Debug.Print Err.Number, Err.Description
    Exit Sub
    '-2147221231 Automation error
    'ClassFactory cannot supply requested class
    End If
    appWord.Quit
    Set appWord = Nothing
    End Sub


    Private Sub CreateWordObjectUsingCreateObject()
    Dim appWord As Word.Application

    On Error Resume Next
    Set appWord = CreateObject("Word.Application")
    If Err.Number <> 0 Then
    Debug.Print Err.Number, Err.Description
    Exit Sub
    '-2147221231 Automation error
    'ClassFactory cannot supply requested class
    End If
    appWord.Quit
    Set appWord = Nothing
    End Sub
    </pre>


  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word 2003 and Norton Auntie Virus 2004 (Word 2003)

    Added info:

    1. I do not have NAV Office plug-in enabled.
    2. I tried with NAV Office plug-in enabled, same problem.
    3. No such problem creating an Excel object, even from within Word.

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Word 2003 and Norton Auntie Virus 2004 (Word 2

    Does your project have a reference to the latest object library for Word 2003?

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word 2003 and Norton Auntie Virus 2004 (Word 2

    Yes, indeedy.

    Problem occurs even if the code is run within Word itself.

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Word 2003 and Norton Auntie Virus 2004 (Word 2

    Web search shows a few .NET developers having this problem with Word.Application during the past month, but I didn't see a solution offered anywhere.

    Could the COM information in the Registry be pointing to the wrong files (is this a multi-version-of-Word setup?)? Try re-registering the Word objects as per MSKB 210565: Start > Run... > winword.exe /r

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word 2003 and Norton Auntie Virus 2004 (Word 2

    There's a related thread in the newsgroup microsoft.public.vb.ole.automation.
    Thread is dated 19 Aug 2004 and is titled "Err 2147221231 Classfactory cannot supply requested class".

    I'll try:

    1. Running an Office repair. Could be that the install of NAV 2004 replaced some DLL.
    2. I'll also run Office update.
    3. If none of that works, I'll uninstall, then re-install Office.

  7. #7
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word 2003 and Norton Auntie Virus 2004 (Word 2

    I have more info.

    I uninstalled NAV 2004.
    Then instead of the ClassFactory error, I got:

    -2147024770 Automation error
    The specified module could not be found

    I reinstalled NAV.

    So, I then ran a detect and repair of Office.
    Still got error.
    Ran a Reinstall of Office.
    Still got error.
    Uninstalled, then re-installed Office.
    No more error.

    So, something clobbered something in Office between 22 July 2004 and 31 Aug 2004.
    Only software installed in that time frame was NAV 2004.
    One theory is that NAV changed something that Office detect and repair or reinstall could not fix.
    I could (dis)prove this theory by uninstalling and re-installing NAV, but as things are now working, I cannot justify the time.
    If theory proved correct, then I'd have to again uninstall and re-install Office, too time consuming.

Posting Permissions

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