Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2006

Tip: Looking for answers? Try searching our database.

PRB Why does Application.Scripts not work for OnAction?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ATS - 28 Jul 2006 19:38 GMT
PRB Why does Application.Scripts not work for OnAction?

I tried to make a command bar button and set its OnAction to call script I
added with Application.Scripts. And I failed. I asked on MSDN and was told
OnAction for a command bar button can not call the script added via
Application.Scripts.Add.

So, I'm left, why?

And for that matter, what good is Application.Scripts?
Jean-Guy Marcil - 29 Jul 2006 04:00 GMT
ATS was telling us:
ATS nous racontait que :

> PRB Why does Application.Scripts not work for OnAction?
>
[quoted text clipped - 6 lines]
>
> And for that matter, what good is Application.Scripts?

What code did the OnAction call executed?

In the Word VBA context, the "Application" keyword refers to Word itself.
There is no "Scripts" method/properties under the Application property in
the Word Object library. So, what are you referring to when you mention
"Application.Scripts". Do you mean VBS?

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

ATS - 31 Jul 2006 14:51 GMT
My mistake on the Application.Scripts, I meant Document.Scripts.
Jean-Guy Marcil - 31 Jul 2006 16:21 GMT
ATS was telling us:
ATS nous racontait que :

> My mistake on the Application.Scripts, I meant Document.Scripts.

Those scripts are meant to be used in HTML documents, either in the <head>
or in the <body>.
When the HTML page is loaded, depending on the script, it will execute
automatically, or wait for user input.

This is why you cannot call the script directly in the Word environment.

What are you trying to do?

If you are not building an HTML document, ".Scripts" is not the way to go.

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.