Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Word Automation

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,1710
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Word Automation
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Word Automation - 12/16/2004 2:52:11 AM   
  nathans

 

Posts: 10
Score: 0
Joined: 12/6/2004
From:
Status: offline
HI

I have tried the following to open a word instance to insert some fields from a form on my web site, however it doesnt seem to work or even show the word instance. Am i missing something obvious, as it works in normal VB,

<html>
<body>
<script language="vbscript">

set wrd = createobject("word.application")

wrd.visible = true

</body>
</html>

Thanks in advance

Nathan
 
 
Post #: 1
 
 Re: Word Automation - 12/16/2004 6:04:14 AM   
  hq_giap

 

Posts: 8
Score: 0
Joined: 12/7/2004
From:
Status: offline
Hi there
Try to copy these lines into notepad, and saveas "test.vbs".

set oshell = wscript.createobject("wscript.shell")
oshell.run("winword")

To execute the *.vbs file, you just have to doubleclick on the filename.
Hopefully this works ok ....

hq_giap

(in reply to nathans)
 
 
Post #: 2
 
 Re: Word Automation - 12/16/2004 9:53:39 PM   
  nathans

 

Posts: 10
Score: 0
Joined: 12/6/2004
From:
Status: offline
HI

I dont think that this will help me with what i want to do. Although grateful for your help, i need to have word as an object so that i can reference it and add results from my web page.

TIA

Nath.

(in reply to nathans)
 
 
Post #: 3
 
 Re: Word Automation - 12/17/2004 5:36:56 AM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
Hiya,

I tried your code, and it doesn't work as how you put it in your first post, however, after closing the Script with its tag, it did work just fine:

      

(in reply to nathans)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Word Automation Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts