Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Dec 2002
    Location
    Philadelphia, Pennsylvania, USA
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem with documents.open statement (XP/Word 2002)

    I have a VBA app that runs fine on win98/word2000. When run on XP/wrd 2002, the program crashes at the documents.open statement. An error message indicating an invalid opject containing a "~" character in the string. I also notice a temporary word file created in same directory (also containing '~' in file name). Any help would be greatly appreciated. Thanks.

  2. #2
    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: Problem with documents.open statement (XP/Word 2002)

    If the error has a number and longer description, could you post that?

    Also, could you post the line that's failing, and if the file name parameter is a string variable, enough of the code to see how it is derived?

  3. #3
    New Lounger
    Join Date
    Dec 2002
    Location
    Philadelphia, Pennsylvania, USA
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Problem with documents.open statement (XP/Word 2002)

    Thanks for the reply. Here is some more info. The line of code that is failing is:

    wrd.Documents.Open "C:convmastersbnotice.doc"

    When I run the program in design mode I get the following error:

    'Run Time error '-2147417851(80010105)'; Method 'OPEN' of object 'Documents' failed.

    If I resume the program, the document will open. When I close word, I get the 'Word is recovering your documents progress bar' and then the dialog that says that word encounterd a serious error, do you want to send it to Microsoft'.

    When I run the program from an executable, I get the message 'Run time error '-2147417851(80010105)'; Method '~' of object '~' failed, and the program ends.


    Thanks for your help.

Posting Permissions

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