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