Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2005
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Use an asp page to open a MS Word file

    How can I code asp to open a MS Word file that has been linked to an Access Databse to populate itself with address labels. The users can add, edit and delete users from their address database from the online asp pages. They all have MS Word on the workstations and the template.doc will be available on the server. So as long as I can get the Asp page to open word they can open the template and have it populated no matter what workstation they are at. Thanks

    Darren

  • #2
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Not quite sure what your server setup is or how you want it to open, but you have a few options depending on what you need.
    1. Direct link to the doc.
    2. User clicks link, app gets file (filesystemobject) and streams it as application (content type)
    3. CreateObject and direct manipulate it, then serve it.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #3
    New Coder
    Join Date
    Jul 2005
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can you explain 2 and maybe 3 to me. If you don't mind.

    Darren

  • #4
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    1. Will work if all they need is the word document and it is available in a public place the web server knows of.
    2. Same as #1, except the file is stored somewhere the user cannot get to. i.e. file download.
    3. For use when the server has to do something with it first. After re-reading your first post, this is not what you need, since you said they have a local copy of the DB/Access file.

    So, the question is, is the template stored where the web server can serve it, or is it in the file system?
    If in the file system, you need to do a file download type thing (#2).
    I have one of those in C# for Excel templates we use. I could post code if you need it as an example. Pretty simple, though. I googled file downloads, got a java sample, and made it with C#.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/


  •  

    Posting Permissions

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