VBA or VB.Net or combo?

C

Charlie Mac

VBA Gerus,

I have a Word macro that presents a toolbar with options to scan the
document for about 300 text patterns (words or parts of words).
Presently these patterns are hardcoded. I need to be able to load
these text patterns and a few values (e.g., font preference) from an
Access database. I will need add, edit, and delete functions. Should
I create a second app (a VB.Net executable) to interface with the
database? How do I pass variables between VBA and VB.Net? Is it
possible/desirable to interface with the database directly from a VBA
toolbar? Should I just go away? Thanks.

Charlie from Texas
 
K

Karl E. Peterson

Charlie said:
VBA Gerus,

Is that some sort of unisex derivative of the more common salutation? said:
I have a Word macro that presents a toolbar with options to scan the
document for about 300 text patterns (words or parts of words).
Presently these patterns are hardcoded. I need to be able to load
these text patterns and a few values (e.g., font preference) from an
Access database. I will need add, edit, and delete functions.

So far, so good, although INI files are potentially far simpler for
something like this, depending on your precise data needs.
Should I create a second app (a VB.Net executable) to interface with the
database? How do I pass variables between VBA and VB.Net?

Good grief, no. Why? (In particular, why VB.Net???)

If you must do something external, writing a DLL with VB5/6 would be far
more practical.
Is it possible/desirable to interface with the database directly from
a VBA toolbar?

Sure! Just set a reference to DAO or ADO and get to it.
Should I just go away? Thanks.

Charlie from Texas

Will ya take Dubya back with ya? <vbg>
 
J

Jonathan West

VBA Gerus,

I have a Word macro that presents a toolbar with options to scan the
document for about 300 text patterns (words or parts of words).
Presently these patterns are hardcoded. I need to be able to load
these text patterns and a few values (e.g., font preference) from an
Access database. I will need add, edit, and delete functions. Should
I create a second app (a VB.Net executable) to interface with the
database? How do I pass variables between VBA and VB.Net? Is it
possible/desirable to interface with the database directly from a VBA
toolbar? Should I just go away? Thanks.

Charlie from Texas

No need to use VB.NET for this. You can access a database directly from VBA.
The following article shows one possible way.

Access a database and insert into a Word document the data that you find
there
http://www.word.mvps.org/FAQs/InterDev/GetDataFromDB.htm
 

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