Consulting

Results 1 to 4 of 4

Thread: Error running Word from Excel

  1. #1

    Error running Word from Excel

    Hi!

    Strange problem follows! Sometimes, usually when I've made changes to the codes in which it's located, when running the code (runs from Excel) it stoppes with error "Runtime error no '462'. Remote server is missing or is not available" (translation from Swedish).

    [VBA] wrdApp.Selection.Rows.Height = CentimetersToPoints(0#)[/VBA]

    What server? If I just quit and run it again it usually works! This is so strange to me...

    What might be the problem?

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    It sounds to me that wrdApp has got corrupted, so it doesn't point to a Word instance, or perhaps the Word instance was closed. Difficult to say without the full picture.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Might be wrdApp gets corrupted. However it's strange that it always works on the second try. Maybe if I would try add a few seconds delay right before where it crashes it might work? What do you think?

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    As I said, it is hard to say, but you could try a wait, try DoEevents, and finally try handing the task off using OnTime.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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