Web Analytics Made Easy -
StatCounter Opening Word thourg 'href' link - CodingForum

Announcement

Collapse
No announcement yet.

Opening Word thourg 'href' link

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new 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
    its basically impossible to do because every href is defined to be opened in a IE window

    Comment


    • #3
      bos...
      just a checkout® this link...
      Microsoft support is here to help you with Microsoft products. Find how-to articles, videos, and training for Microsoft 365, Windows, Surface, and more.


      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

      Comment


      • #4
        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

        Comment


        • #5
          Hi!

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


          Thanks.

          Comment


          • #6
            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

            Comment


            • #7
              Just what i was looking for

              Originally posted by justame
              bos...
              just a checkout® this link...
              Microsoft support is here to help you with Microsoft products. Find how-to articles, videos, and training for Microsoft 365, Windows, Surface, and more.


              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

              Comment

              Working...
              X