How to develop an application on Word platform

A

annasProgram

I would like to develop an application on Word platform. My program should
allow me to access additional features that I would like to add to one of the
existing Word menus (for instance to tools/).
Is there someone who knows how to implement such an application?
What programming language should I use and how can my application integrate
with Word in such way that allows me use to access my program features from
it?
 
J

Jonathan West

annasProgram said:
I would like to develop an application on Word platform. My program should
allow me to access additional features that I would like to add to one of
the
existing Word menus (for instance to tools/).
Is there someone who knows how to implement such an application?
What programming language should I use and how can my application
integrate
with Word in such way that allows me use to access my program features
from
it?

VBA is probably what you need - it comes included in Word.

Start out by looking at these articles.

Getting To Grips With VBA Basics In 15 Minutes
http://www.word.mvps.org/FAQs/MacrosVBA/VBABasicsIn15Mins.htm

Creating a macro with no programming experience using the recorder
http://www.word.mvps.org/FAQs/MacrosVBA/UsingRecorder.htm

How to assign a Word command or macro to a hot-key
http://www.word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToHotkey.htm

How to assign a Word command or macro to a toolbar or menu
http://www.word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToToolbar.htm


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
A

annasProgram

Thank you Jonathan for your fast reply.
It is encouraging to know I can create global macros and add additional
features so easily.

My question now is weather I can apply macros while typing without using
play (F5) to run it?

Another question I have is:
Will it later be possible to make an executable file that includes my macro,
for the purpose of installing it on another computer?

Best regards
Anna
 
J

Jonathan West

annasProgram said:
Thank you Jonathan for your fast reply.
It is encouraging to know I can create global macros and add additional
features so easily.

My question now is weather I can apply macros while typing without using
play (F5) to run it?

Yes. Read the alst two of the articles I listed.
Another question I have is:
Will it later be possible to make an executable file that includes my
macro,
for the purpose of installing it on another computer?


Not quite. If you are planning on distributing your macros you would be
well-advised to take distribution issues into account as early as possible
in the design. Take a look at this article

Distributing macros to other users
http://www.word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
A

annasProgram

Thank very much for your valuable help Jonathan!

I am still in the building stage of my program (didn’t start programming
yet) and understand VBA is very flexible, however I want to make sure VBA
will allow me to perform all the functions I wish to have in my program.
I wonder therefore whether:
I can create (from Word) an Access relation database?
VBA can integrate with other environments such as java and/or c++?

Best regards
Anna
 
J

Jonathan West

Hi Anna


annasProgram said:
Thank very much for your valuable help Jonathan!

I am still in the building stage of my program (didn’t start programming
yet) and understand VBA is very flexible, however I want to make sure VBA
will allow me to perform all the functions I wish to have in my program.
I wonder therefore whether:
I can create (from Word) an Access relation database?

You can certainly link to an Access database and do almost anyhting with it
that can be done from VBA within Access. This article gives you an example
of how to do that.

Access a database and insert into a Word document the data that you find
there
http://www.word.mvps.org/FAQs/InterDev/GetDataFromDB.htm
VBA can integrate with other environments such as java and/or c++?

There are two mechanisms by which you can access external libraries from VBA
code.

1. The Declare statement. This is commonly used for accessing Windows API
functions. There is already an extensive literature on the web for using
Windows API functions from VB6 and VBA (the syntax and techniques are the
same in both cases). However, Declare is not limited to using the built-in
Windows libraries, but can be used for any conventional 32-bit DLL.

An example of Declare can be seen in this article

Creating a Splash Screen with a UserForm
http://www.word.mvps.org/FAQs/Userforms/CreateASplashScreen.htm


2. Use of COM/ActiveX. If you have an ActiveX DLL (created in any language)
registered on the system you can reference it by opening the VBA editor,
going to Tools, References, and browse to the DLL to add it to the
references in your project. It then acts much as if it is a class module
with methods are properties, but whose code you cannot see. Alternatively,
you can use late binding by referencing the DLL at runtime using the
GetObject or CreateObject commands.

An example of VBA code using an external ActiveX DLL can be found here

Getting access to the Document Properties of a Word file
http://www.word.mvps.org/FAQs/MacrosVBA/DSOFile.htm

An example of the use of late binding is here

Control Excel from Word
http://www.word.mvps.org/FAQs/InterDev/ControlXLFromWord.htm

I am not aware of specific features within VBA to link with Java libraries,
if the techniques described above do not work.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 

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