Creating Word document

Discussion in 'ASP .Net' started by ton, Jan 6, 2009.

  1. ton

    ton Guest

    Hi,

    I want users to create a word document via javascript in my (vb) asp.net
    application (website).
    Is this possible?
    Is this possible for all browsers?

    the script (which I've found on the web):

    function startWord(strFile)
    {
    var myApp = new ActiveXObject("Word.Application");
    if (myApp != null)
    {
    myApp.visible = true;
    myApp.documents.Open('#jsSafe_FilePath#');
    }
    return false;
    }

    does not work: I receive an runtime error Microsoft Jscript can create
    object

    Thanx


    ton
     
    ton, Jan 6, 2009
    #1
    1. Advertising

  2. ton

    ton Guest

    what is " and you ramp your website's security right down..."

    ton

    "Mark Rae [MVP]" <> schreef in bericht
    news:...
    > "ton" <> wrote in message
    > news:33d5f$496344b7$541ec4bd$1.nb.home.nl...
    >
    >> I want users to create a Word document via JavaScript in my (VB) ASP.NET
    >> application (website).
    >> Is this possible?

    >
    > Yes, so long as all your users have Word installed locally, all run
    > Microsoft IE, and you ramp your website's security right down...
    >
    >> Is this possible for all browsers?

    >
    > No - ActiveX is for Microsoft IE only...
    >
    >> I receive an runtime error Microsoft Jscript can[not] create object

    >
    > That could mean various things, most likely to be either a security
    > violation or that the local user doesn't have Word installed...
    >
    > Fortunately, creating Word documents in ASP.NET is very simple if you use
    > Aspose:
    > http://www.aspose.com/categories/file-format-components/aspose.words-for-.net-and-java/default.aspx
    >
    > Alternatively, you can create an HTML document and save it with a .doc
    > extension - Word will understand...
    >
    > Neither of these solutions requires Word to be installed anywhere, other
    > than to read the document if required, though you could also use the Word
    > Viewer for this...
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
     
    ton, Jan 7, 2009
    #2
    1. Advertising

  3. ton

    ton Guest

    thank you

    is it possible to get this setting just for my (application) website




    "Mark Rae [MVP]" <> schreef in bericht
    news:...
    > "ton" <> wrote in message
    > news:ec88$49647f47$541ec4bd$1.nb.home.nl...
    >
    >>>> I want users to create a Word document via JavaScript in my (VB)
    >>>> ASP.NET application (website).
    >>>> Is this possible?
    >>>
    >>> Yes, so long as all your users have Word installed locally, all run
    >>> Microsoft IE, and you ramp your website's security right down...

    >>

    >
    >> what is " and you ramp your website's security right down..."

    >
    > Apologies, that was poorly phrased...
    >
    > You will need to set local browser security to a (very) low level just to
    > be able to use ActiveX in this way - not recommended...
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
     
    ton, Jan 7, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nikhil Patel

    creating word document in asp.net

    Nikhil Patel, May 12, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    1,015
    Nikhil Patel
    May 13, 2004
  2. =?Utf-8?B?Tm92aWNl?=

    Creating Word Document in ASP.NET Application

    =?Utf-8?B?Tm92aWNl?=, Aug 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    12,760
    =?Utf-8?B?Tm92aWNl?=
    Aug 17, 2004
  3. srk
    Replies:
    0
    Views:
    696
  4. srk
    Replies:
    0
    Views:
    654
  5. Michael G. Schneider

    Modifying a Word document without using Word Automation

    Michael G. Schneider, Dec 15, 2003, in forum: ASP General
    Replies:
    5
    Views:
    329
    el.c. - myLittleTools.net
    Dec 16, 2003
Loading...

Share This Page