Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Microsoft Script Editor in Word 2003
Hi everyone
I'm familiar with the VBA editor (Alt + F11) in Word 2003 and Excel 2003 to edit code or a macro. I've been introduced recently to the Microsoft Script Editor (Alt + Shift + F11) in the same applications. I've been advised that I can use this to edit and debug Visual Basic Script but I've run into problems using it. I've opened the VB Script via the Editor and hoped to step therough it (as I would if I had code in Word or Excel) but it won't do so. When I press F11 to step into the code, it doesn't do so. I've tried F5 to run the code which causes the indicator on the blue bar at the top of the pane to change from "design" to "run" and the pane changes slightly but then everything return to as it was. The code should result in message boxes being produced but that doesn't happen. Similarly, if I type something into the Immediate Pane, the response is "The expression cannot be evaluated whilst in design mode". I'm not sure if there's a problem with the editor (I've tried repairing from the installation disc) or if I'm misusing it. I've done a lot of googling but can't find explicit instructions dealing with how to use the editor! I've tried asking a similar question on a VBS forum but that's not resulted in a solution. I felt it appropriate to ask on a Word forum as I access this editor from Word 2003. Does anyone have any suggestions which will allow me to use this editor to write and debug VB Script? Thanks for your patience! |
#2
|
|||
|
|||
Hi Tosca,
I've been programming in Word since Word95 and have been working with 2003 since it's inception. I never knew about the editor. You can teach an old dog new tricks. Tell me, do you have Visual Studio installed? I think you may actually jumping into that environment. If so, then you'll have to set a reference to the Word object. I'm very interested in what you're doing. Perhaps we can discover some of this together. If you'd like to go further with this exploration, please feel free to email me at . -- Please visit my new site: www.marcmyword.com. I''d love your input as to how to make it great. "Tosca" wrote: Hi everyone I'm familiar with the VBA editor (Alt + F11) in Word 2003 and Excel 2003 to edit code or a macro. I've been introduced recently to the Microsoft Script Editor (Alt + Shift + F11) in the same applications. I've been advised that I can use this to edit and debug Visual Basic Script but I've run into problems using it. I've opened the VB Script via the Editor and hoped to step therough it (as I would if I had code in Word or Excel) but it won't do so. When I press F11 to step into the code, it doesn't do so. I've tried F5 to run the code which causes the indicator on the blue bar at the top of the pane to change from "design" to "run" and the pane changes slightly but then everything return to as it was. The code should result in message boxes being produced but that doesn't happen. Similarly, if I type something into the Immediate Pane, the response is "The expression cannot be evaluated whilst in design mode". I'm not sure if there's a problem with the editor (I've tried repairing from the installation disc) or if I'm misusing it. I've done a lot of googling but can't find explicit instructions dealing with how to use the editor! I've tried asking a similar question on a VBS forum but that's not resulted in a solution. I felt it appropriate to ask on a Word forum as I access this editor from Word 2003. Does anyone have any suggestions which will allow me to use this editor to write and debug VB Script? Thanks for your patience! |
#3
|
|||
|
|||
Hi Marc
Like you, I have been codiong in Word and Excel intermittently for a couple of years but not to a high level. I was astonished when I stumbled across the editor! I don't have Visual Studio installed. I can open a .vbs file with the Editor but it always goes to the design mode and some of the text is displayed in blue, but there is not "instinctive" response by the editor, as there is when writing VBA for Word or Excel. I've managed to get into debug mode by StartRunwscript //x full path and name of vbs file. This gives a familar screen with a yellow bar with which I can step through the code with F11. Unfortunately, I've not found out how to stop the code and retain it in this window for editing! If I need to edit the code, I go back to Notepad, resave it as a .vbs file and then StartRun.... again. "Marc Adams [marcmyword.com]" m wrote in message ... Hi Tosca, I've been programming in Word since Word95 and have been working with 2003 since it's inception. I never knew about the editor. You can teach an old dog new tricks. Tell me, do you have Visual Studio installed? I think you may actually jumping into that environment. If so, then you'll have to set a reference to the Word object. I'm very interested in what you're doing. Perhaps we can discover some of this together. If you'd like to go further with this exploration, please feel free to me at . -- Please visit my new site: www.marcmyword.com. I''d love your input as to how to make it great. |
#4
|
|||
|
|||
Hi Tosca,
The MS Script Editor is an Office 2000, Office XP(2002) and Office 2003 installation option. It's basically the HTML/XML 'source' editor for Word documents (without the Visual Studio Environment) and for Outlook forms work. You can use the Editor for scripting, Cascading Style Sheets, etc http://office.microsoft.com/en-us/as...353781033.aspx Word documents can contain scripts, but they don't run in the Word document environment (same limitation as using an animated GIF - Word knows it runs, but relies on an outside engine to keep things secure.) Having said that g there are some bug issues with the Script Editor within Word http://support.microsoft.com/default...us;840184&FR=1 ======== "Tosca" wrote in message ... Hi everyone I'm familiar with the VBA editor (Alt + F11) in Word 2003 and Excel 2003 to edit code or a macro. I've been introduced recently to the Microsoft Script Editor (Alt + Shift + F11) in the same applications. I've been advised that I can use this to edit and debug Visual Basic Script but I've run into problems using it. I've opened the VB Script via the Editor and hoped to step therough it (as I would if I had code in Word or Excel) but it won't do so. When I press F11 to step into the code, it doesn't do so. I've tried F5 to run the code which causes the indicator on the blue bar at the top of the pane to change from "design" to "run" and the pane changes slightly but then everything return to as it was. The code should result in message boxes being produced but that doesn't happen. Similarly, if I type something into the Immediate Pane, the response is "The expression cannot be evaluated whilst in design mode". I'm not sure if there's a problem with the editor (I've tried repairing from the installation disc) or if I'm misusing it. I've done a lot of googling but can't find explicit instructions dealing with how to use the editor! I've tried asking a similar question on a VBS forum but that's not resulted in a solution. I felt it appropriate to ask on a Word forum as I access this editor from Word 2003. Does anyone have any suggestions which will allow me to use this editor to write and debug VB Script? Thanks for your patience! |
#5
|
|||
|
|||
Thanks Bob - someone has suggested that I use Visual Studio. I may go for
that as Im getting more and more interested in scripting. "Bob Buckland ?:-)" 75214.226(At Beautiful Downtown)compuserve.com wrote in message ... Hi Tosca, The MS Script Editor is an Office 2000, Office XP(2002) and Office 2003 installation option. It's basically the HTML/XML 'source' editor for Word documents (without the Visual Studio Environment) and for Outlook forms work. You can use the Editor for scripting, Cascading Style Sheets, etc http://office.microsoft.com/en-us/as...353781033.aspx Word documents can contain scripts, but they don't run in the Word document environment (same limitation as using an animated GIF - Word knows it runs, but relies on an outside engine to keep things secure.) Having said that g there are some bug issues with the Script Editor within Word http://support.microsoft.com/default...us;840184&FR=1 ======== |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Please give us REVEAL CODES like WORD PERFECT not reveal codes in. | Microsoft Word Help | |||
hard space between words. | Microsoft Word Help | |||
Please add an outlining feature like WordPerfect's. | Microsoft Word Help | |||
Word 2003 Mailmerge problem - works in Word 2000 | Mailmerge | |||
How do I create & merge specific data base & master documents? | New Users |