How to Write Macros

C

Cindy M -WordMVP-

Hi =?Utf-8?B?QXNoaXNoX0phaXB1cg==?=,
Can we write macros with the help of VB.net
Can you explain in more detail what you have in mind?
Including the application in which you plan to use this?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 
A

Ashish_Jaipur

Hi Cindy,

I have to write an Word Add-in. What I want is same functionality by which I
can write macros in .net as we can write with VBA and add these macros to
Toolbars buttons and menu item by simple drag and drop at the time of
Template creation.

I hope now u have a better Idea of what I want.
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?QXNoaXNoX0phaXB1cg==?=,
I have to write an Word Add-in. What I want is same functionality by which I
can write macros in .net as we can write with VBA and add these macros to
Toolbars buttons and menu item by simple drag and drop at the time of
Template creation.
There's no way you can assign "macros" written in a COM Addin (whether written
with VB.NET or classic VB6) to toolbar buttons via the user interface
(drag-and-drop from the Customize/Commands dialog box). The Word UI exposes
only public procedures in an opened/loaded VBA project, requiring no
parameters, in modules not marked with Option Private.

You'd have to create the toolbars and buttons in your Addin code. You should
find sample code for this on the msdn website, in the area dealing with
Office/Word.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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

Top