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 7 of 7
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    The sunny side of the Alps
    Posts
    230
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Opening Word thourg 'href' link

    Hi!

    I have a link that opens Word document

    <a href="document.doc" target="_blank">Open document</a>

    Of course, the document opens in IExplorer window. But there is a problem - the document I'm trying to open contains AutoOpen macro that starts whenever the document is opened. When I open the document through IExplorer, I get this error:

    Run-time error: '4605':
    This method or property is not valid because: this document is in other application.


    So - how can I open the document in Word window?

    Thanks,
    Bostjan

  • #2
    New Coder
    Join Date
    Jul 2002
    Location
    UK
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    its basically impossible to do because every href is defined to be opened in a IE window

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    676
    Thanks
    1
    Thanked 0 Times in 0 Posts
    bos...
    just a checkout® this link...
    http://support.microsoft.com/default...;EN-US;q162059

    seems by just a default®??? ie isss set to just a open® office programs...
    sooo ifin' you dont want to just a change® your 'settings' orrr just a sk® your viewers tooo???
    bestest to just a zip® the file...:O)))
    The New JustaBuster Version 2.0 OR JustaBusta Lite V2.0
    ...just a special® thanx kinda hugs to jkd n' nex ...:O)))

    CommemorateWTC.com --Please lend your support

  • #4
    Regular Coder
    Join Date
    Jul 2002
    Location
    Raleigh, NC
    Posts
    484
    Thanks
    0
    Thanked 0 Times in 0 Posts
    using asp I've opened dynamically generated tables in excel... I'm not sure if will work with word, but its worth a try... If your familiar with asp let me know and I'll give you the code.
    -WebMark Art
    Programming is 80% thinking and 20% spelling

  • #5
    Regular Coder
    Join Date
    Jul 2002
    Location
    The sunny side of the Alps
    Posts
    230
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi!

    All my pages are actually created in ASP so it would be great if you could give me the code.


    Thanks.

  • #6
    Regular Coder
    Join Date
    Jul 2002
    Location
    Raleigh, NC
    Posts
    484
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here is what I did for excel, so try playing around with the application name (perhaps application/vnd.ms-word) to get it to work with word...


    --------PUT THIS ON THE VERY TOP OF YOUR ASP PAGE---------
    <%
    action = Trim(Request("action"))

    If action = "msexcel" Then
    Response.ContentType = "application/vnd.ms-excel"
    End If
    %>


    -------THIS IS THE LINK TO THE DOC----------------
    <A HREF="yourpage.asp?action=msexcel">View Word Doc</A>


    The action="msexcel" was a plain html table with the rows being looped for all of the records in the database. I'm guessing that if you put the text in a plain html table as you would want it formated it would open in word.... I have never tried it in word so this may not work.
    -WebMark Art
    Programming is 80% thinking and 20% spelling

  • #7
    New to the CF scene
    Join Date
    Feb 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Just what i was looking for

    Quote Originally Posted by justame
    bos...
    just a checkout® this link...
    http://support.microsoft.com/default...;EN-US;q162059

    seems by just a default®??? ie isss set to just a open® office programs...
    sooo ifin' you dont want to just a change® your 'settings' orrr just a sk® your viewers tooo???
    bestest to just a zip® the file...:O)))

    This is just what i was looking for. Gives users ability to email formated Word doc. good link


  •  

    Posting Permissions

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