View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier[_9_] Jon Peltier[_9_] is offline
external usenet poster
 
Posts: 146
Default Error while controlling Word from Excel

Does your Excel VBA project have a reference to the Word object model?
Presumably everyone in your office has the same version of Word, so
there's no incompatibility. If you have a reference to a later version
of Word than is used by the person outside your office, you could be
getting errors. The options you have are to set a reference to an older
Word object library, or convert to late binding (remove the reference,
declare Word variables as objects, and convert Word-specific constants
to their numerical values).

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

JFamilo wrote:

I have a series of macros in an Excel file that users use to create
spreadsheets. When they are finished creating spreadsheets they can
print "reports" in Word. To do this I am controlling Word from Excel
with VBA. This works fine for all of the associates in my office.
However, I have an associate in another office (about 1500 miles away)
that has Word crash whenever he tries to run reports. He gets the
error box "Word has encountered a problem and needs to close" and is
then asked to send or not send an error report. Once he clicks either
of these options the Excel macro fails because it is trying to talk to
Word that isn't there. Since he is so far away I cannot tell what is
going wrong. Like I said, no one else has these problems and the rest
of the macro works fine for him.

I talked to our corporate "help" people but they of course were no help
whatsoever. The excel file with all the macros is located on our shared
drive that this associate also has access to. Any ideas of what could
be causing this or how to fix it?