CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2019
    Posts
    3

    Com Addin for outlook

    Good morning all, I am not sure where to put this so i thought ahh general will be a start.

    So i have created a com addin using Visual studio 2017 which adds a new group in outlook ribbon and adds a button. Great well done i hear you cheer (for me its an accomplishment).
    So off the back of this i now need to add in a script which is a VBS script. I can create a macro and add it to the button and the script runs fine, but ideally what i would like to do is from the com addin add the click command and for it to run the VBS script. what would be the best way of going about this? the com addin was created in C#.

    Is there a option in Visual studio 2017 which will allow you to add the vbs script so it runs?
    Perhaps create a standalone VBS script which is called from the com addin?
    Or something else

    Please bear in mind i am not a programmer i am a visual files developer so the programming knowledge i have on C# and VBS has all been from the great googleo

  2. #2
    Join Date
    Feb 2019
    Posts
    3

    Re: Com Addin for outlook

    Update
    please read VBS as VBA i tried to find the edit button but no where to be seen

  3. #3
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Com Addin for outlook

    You may look to find an alternative approach to running the functionality that is in the VBA script. I doubt that security inside Outlook is going to allow a vba script to run inside the Outlook plug-in. At any rate, search google for running vba from c#. If you can execute the vba script from a c# console app, but the same code doesn't work inside the Outlook plug-in, it may be a permission issue or simply not allowed.

  4. #4
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,398

    Re: Com Addin for outlook

    Quote Originally Posted by CraigABDparkinson View Post
    Update
    please read VBS as VBA i tried to find the edit button but no where to be seen
    "the edit button" will appear after about five posts from you.
    Victor Nijegorodov

  5. #5
    Join Date
    Feb 2019
    Posts
    3

    Re: Com Addin for outlook

    Quote Originally Posted by VictorN View Post
    "the edit button" will appear after about five posts from you.
    Aha Victor that explains it.

    Ok news for you all the reason the VBA code would not work on the Terminal server was that the following DLL was not installed on the terminal

    C:\Program Files (x86)\Microsoft Office\Office14\OUTLVBS.DLL

    To fix it was as simple as copy from a working PC to the same place on the terminal server. restart the server.

    Still looking into how i can run the VBA from the VTSO com addin i have created. Comm addin adds a new group in the home ribbon and then creates a button. that button then to run the VBA script. I think so far it looks like i need to add the macro and then call the macro from the button. ANy thoughts?

    I will keep you updated

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured