Word Automation Error


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Word Automation Error

  1. #1
    Ruben Guest

    Word Automation Error


    Hello!

    I have the following code in an .asp file:

    Set wrd = CreateObject("WORD.Application")
    Set doc = wrd.Documents.Open("c:/doc1.dot")
    Response.Write "Opened"
    doc.SaveAs ("C:/newfile.doc")
    wrd.Quit

    I get an error when loading this .asp file:

    Call rejected by Callee.

    I looked up articles for this error. Nothing helpfull.

    IN ADDITION: !!!! THIS WORKS ON SOME MACHINES, NOT ON OTHERS !!!!

    Any help will be greatly appreceated

  2. #2
    Glenn Guest

    Re: Word Automation Error


    "Ruben" <rubenlus@home.com> wrote:
    >
    >Hello!
    >
    >I have the following code in an .asp file:
    >
    > Set wrd = CreateObject("WORD.Application")
    > Set doc = wrd.Documents.Open("c:/doc1.dot")
    > Response.Write "Opened"
    > doc.SaveAs ("C:/newfile.doc")
    > wrd.Quit
    >
    >I get an error when loading this .asp file:
    >
    >Call rejected by Callee.
    >
    >I looked up articles for this error. Nothing helpfull.
    >
    >IN ADDITION: !!!! THIS WORKS ON SOME MACHINES, NOT ON OTHERS !!!!
    >
    >Any help will be greatly appreceated

    Ruben, I've never seen that particular error message, but perhaps the reason
    it works on some machines and not others is due to the security settings
    on the IE browsers.

    In order for a script (and also perhaps an object in a script) to read from
    and write to the user's local drive, the "Access data sources across domains"
    security setting must be enabled.

    P.S. You also might want to use backslashes instead of forwardslashes in
    your file path statements!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center