Showing results 1 to 4 of 4

Thread: Calling VSTA Macro

  1. #1
    Join Date
    06.11.2012
    Posts
    16

    Default Calling VSTA Macro

    I've added a simple VSTA macro which displays a message


    public void TestButton()
    {
    MessageBox.Show("This is a test.");
    }

    When I create a function to Execute VSTA macro the Macro Selection pop up is empty. I built ths project by going to build > BildProjectAddin and still nothing appears. Does anyone have any idea how to call the macro? Thank you.

  2. #2
    Join Date
    06.11.2012
    Posts
    16

    Default Re: Calling VSTA Macro

    I just found out by changing the macro name from TestButton to Macro1 it now shows up in the list of available macors.

  3. #3
    Join Date
    29.07.2007
    Location
    Germany
    Posts
    192

    Default AW: Calling VSTA Macro

    Hello!

    found this case running into the same problem...

    In the help it is mentioned that a function that you would like to call in editor or runtime have to start with Macro...

    Any idea why there is such a rule? Using VBA there is no rule like this?

    Here ist the part of the help, sorry it is in german:


    Achtung

    Die Methodennamen dürfen ausschließlich mit Macro (beispielsweise Macro1, MacroVSTA) beginnen, keine Parameter beinhalten und müssen als Public definiert sein. Zudem dürfen der Klassenname und andere von VSTA erstellte Methoden und Events nicht verändert werden


    H.-P.
    string zenon = "7.60 Build61612 / 8.00 Build62073/ 8.10 Build62573";
    string Windows = "7 / 10 / 2016";
    string VMware = "Workstation / VMware ESXi";

  4. #4
    Join Date
    20.08.2009
    Posts
    293

    Default Re: Calling VSTA Macro

    Hi,

    this is a technical restriction and it has to be named with the prefix "Macro" for filtering issues.

    Regards,
    Bernhard

Similar Threads

  1. Replies: 5
    Last Post: 4th December 2014, 09:45
  2. VSTA Macro c# - Funktion "VSTA_Makro ausführen"
    By ilia_romeikov in forum VSTA
    Replies: 2
    Last Post: 17th September 2012, 13:44
  3. Replies: 2
    Last Post: 6th March 2012, 11:09
  4. Error in VSTA Macro(get_Value)
    By focus in forum VSTA
    Replies: 1
    Last Post: 16th February 2012, 13:58
  5. VSTA macro with arguments
    By sldewit in forum VSTA
    Replies: 2
    Last Post: 28th September 2010, 12:10

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •