Results 1 to 10 of 10

Thread: Document 19

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    11

    Arrow

    Hi,

    I've been using MS Word automation in my VB program and have made some mistakes, corrected them, and now the program works fine.

    But now whenever I open up MS Word (on my own or thru my program), Document 19 is opened, not Document 1, like it used to. Do I have 18 other documents open elsewhere? Do I have processes still running?

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    when you use a word object you have to remember
    to set it to nothing when finished.

    set objWord = nothing

    Could be your problem...
    just reboot to see if you go back to one once
    it clears memory.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    Lively Member
    Join Date
    Dec 1999
    Location
    Karlsruhe, Germany
    Posts
    122
    Look in your task manager for open word processes.

    Roger

  4. #4

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    11
    i've tried rebooting so it's not cleared from memory

    I'm looking in the task manager and could not find anything like winword.exe. Are there other word processes with different names I don't know about?

  5. #5
    Fanatic Member
    Join Date
    Jun 1999
    Location
    California, USA
    Posts
    662
    Try re-creating the word automation object. I could be set to load a blank document named Document 19. I don't have very much experience with automation objects but it seems logical.

  6. #6

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    11
    Well everytime I run the program, I create a word automation object and everytime before the program ends the object is deleted. The problem started when I had an error mid-way thru the program (nothing to do with the automation object) and the program did not reach the statement that quits the object.

    This 'Document 19' occurs all the time. Even if I just turn on my computer and open Word (I didn't even touch my program or VB). Document 19 appears, and not Document 1.

  7. #7
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367
    put error handlers in, and set the objects to nothing in them.

  8. #8
    Lively Member
    Join Date
    Dec 1999
    Location
    Karlsruhe, Germany
    Posts
    122
    You can close the word process by calling the quit method of the Word.Application object.

    But I don't think that will change anything on you actual 'document19-problem'. Take a look an your harddisk. Are there any files called from 'Document1.doc' to 'Document18.doc' in the standard document path of word?

    Roger

  9. #9

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    11
    My whole computer does not contain the files 'Document1.doc' ... 'Document18.doc'.

  10. #10
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Try looking in the normal.dot isn't that the template for new documents? maybe just the title has changed...

    Good luck
    Jop

Posting Permissions

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



Click Here to Expand Forum to Full Width