Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old May 13th, 2015, 01:06 PM
Friend of Wrox
Points: 2,702, Level: 21
Points: 2,702, Level: 21 Points: 2,702, Level: 21 Points: 2,702, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Denver, CO, USA.
Posts: 425
Thanks: 57
Thanked 2 Times in 2 Posts
Default Opening Word Document for Spelling Check using JS

I am converting a VBS to JS. Called by a button click, it opens Word, invokes the spelling checker, passes the text to Word, and returns the corrected text to the text field being checked. It worked just fine in VBS, but I've run into a problem with this JS line:

oDoc = oWord.Documents.Add( , , 1, true);


The first two empty parms causes a "undefined function" error before it even tries to run the script. It at least tries to run the script if I change those parameters to null:


oDoc = oWord.Documents.Add(null, null, 1, true);


But that throws a "Type mismatch" error.

The method clearly didn't care about those parms when called by VBS. Isn't there some way to tell it to ignore them when called by JS? I can't find any useful examples using JS, leading another developer to believe JS simply can't do it.

Reply With Quote
  #2 (permalink)  
Old June 1st, 2015, 12:44 AM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2015
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, guys! I want to share a cool game with you! One Piece Online is co cool and funny, it's based on manga! You may try it!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening word document Hannibal Need help with your homework? 0 March 9th, 2010 07:00 AM
Opening word document read only in VB StevenVints VB How-To 1 May 3rd, 2006 10:52 AM
ASP/JS Button opening a new window dilbert ASP.NET 2.0 Basics 3 December 23rd, 2005 01:20 PM
Access 97 and opening a Word document Andrew Antoniak Access VBA 1 June 11th, 2004 01:29 PM
Opening a MS Word document from ASP saturdave Classic ASP Basics 0 May 25th, 2004 02:47 PM



All times are GMT -4. The time now is 07:15 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.