OK............so can it be possible to write a java script code to
find out a macro inside a doc file and then to delete them??- Hide quoted text -
- Show quoted text -
I use JavaScript to automate Word extensively, and would guess that it
is possible to do this.
Why do you do not wish to create an actual Word Macro or VisualBasic
program to do it for you?
I can only give you some ideas here, as it would take a bit of time to
actually write any code for you:-
1. I think it can only be done within IE.
2. Word provides an object model (accessible through ActiveX) which
you can access in JScript using:-
var wdApp = GetObject("","Word.Application");
3. You may need to rename your ".htm" file to ".hta" (Hypertext
Application) to be able to give JavaScript the necessary security to
connect with a running instance of Word.
4. The Word object model (which can be found under programming
information in the full Word help files) gives you access to both
Documents, and to the VB code modules for macros. It is a little
complicated though. Research the VBComponent and CodeModule
properties.
Julian