Creating Word document

T

ton

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
 
T

ton

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

ton

Mark Rae said:
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...
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top