Skip to content

How to call a MACRO in C# ?

Gunti Dilip

Asked Jun 28, 2013, 2:35 AM EDT1 answer
Share
LinkedInX
 Hi ,

Please help me out to slove this problem....

I Created one WINDOWS FORM in that i created two classes MultiplyMapsmacro and clsWordBuilder..
MultiplyMapsmacro -- Class conists Macro Code...
clsWordBuilder--- Class Which calls Macro

So i am calling a macro named "MULTIPLY_MAPS_ALL" in clsWordBuilder which takes one input as PlanNum....

namespace RC
{
   internal class MultiplyMapsmacro
    {
      internal void MULTIPLY_MAPS_ALL(int PlanNum)
      {Some Set of code.....}
    }
}




namespace RC
{
   class clsWordBuilder
   {
   public bool OpenDocument(string templatePath, string missingMapsInputparam1, string missingMapsInputparam2)
   {
      if ((missingMapsInputparam1 != null) || (missingMapsInputparam2 != null))
      {
         objWord.Run("MULTIPLY_MAPS_ALL", missingMapsInputparam1, missingMapsInputparam2); 
      }
   }
   }
}

Please help me out is this the right way to call a macro.
Tell me how to call a macro which takes One Input "PlanNum"....

"MULTIPLY_MAPS_ALL"--- Macro name
missingMapsInputparam1 ,missingMapsInputparam2 are the Input form the DB.....

Regards,
Dilip.

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 1 short reply
    • 0
      Please help to slove it out..
      0