Identify macro in a word document using c#

M

mishra.sandeep29

i m trying to write a code to identify macros in a word document using
c#,also if any macro exist i want to delete those from doc file using
c#
 
R

Randy Webb

(e-mail address removed) said the following on 6/25/2007 9:55 AM:
i m trying to write a code to identify macros in a word document using
c#,also if any macro exist i want to delete those from doc file using
c#

What does any of that have to do with client side scripting in a Web
Browser?
 
M

mishra.sandeep29

(e-mail address removed) said the following on 6/25/2007 9:55 AM:


What does any of that have to do with client side scripting in a Web
Browser?
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/

I dont understand........is there any thing related to my issue?
 
L

Lee

(e-mail address removed) said:
I dont understand........is there any thing related to my issue?

You won't find anything related to your issue in this newsgroup.
This group discusses the language Javascript. Not C#, not Word macros.


--
 
M

mishra.sandeep29

(e-mail address removed) said:




You won't find anything related to your issue in this newsgroup.
This group discusses the language Javascript. Not C#, not Word macros.

--

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??
 
J

Julian Turner

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top