automation - Calling VBA-Macros with user-defined Types from C#? -


i've got word document vba module contains user defined types (public type xxx) , public subs take type arguments. possible call these subs c# via application's run()?

greetings, steven

i don't know if have flexibility this, here's how solved this.

  1. create assembly (i called mine "xx.common")
  2. add structs in there, make them com-visible
  3. reference assembly both vba , c# projects
  4. add new vba sub structs arguments

you can pass in structured, user-defined data. if generalize idea, can use any com-visible type (i.e. not structs). long both projects reference assembly defines these types, should ok.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -