Passing data from C# to VBA

B

blissk

I'm working on an ASP.NET/C# app which opens a Word 2000 document and runs
macros I've written to automate mail merges and such.

Since I have very little experience concerning VBA, but most especially
working between C# and VBA, I was wondering if anyone here has any idea how
to pass data from C# to a VBA macro or method.

Thank you for any help in advance.
K
 
D

Doug Robbins - Word MVP

via an .ini or .txt file and then using vba to retrieve it with the use of
the System.PrivateProfileString method?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
C

Cindy M.

Hi K,
I'm working on an ASP.NET/C# app which opens a Word 2000 document and runs
macros I've written to automate mail merges and such.

Since I have very little experience concerning VBA, but most especially
working between C# and VBA, I was wondering if anyone here has any idea how
to pass data from C# to a VBA macro or method.
I tend to agree with Doug's suggestion. For the sake of completeness, however,
if you're using the Application.Run method to execute the macros, you can pass
the information as arguments to the method (that's what those extra 29 ref
object things are for).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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