+ Reply to Thread
Results 1 to 4 of 4

Custom Task Pane

  1. #1
    Registered User
    Join Date
    11-28-2005
    Location
    Saint Louis, Missouri USA
    MS-Off Ver
    2016
    Posts
    69

    Custom Task Pane

    I am on working several integrated Excel and Outlook projects for my own use at work. I want a button on a custom task pane to do something. I can not figure out how to call a procedure in Excel or Outlook.

    I am using VSTO 2019 and Office 2016 and am using VBA. I have the following callback in the UserControl1.vb

    Please Login or Register  to view this content.
    I can do anything I want to the CTP from the addin or usercontrol code, but I can not figure out how to call a procedure in the app the addin is installed in (Outlook or Excel). The debugger rejects the procedure as undeclared. And, I can't figure out how to reference a control from Outlook VBA. It does not recognize the usercontrol or the control (they are not in the object browser, also). I did try pasting this callback into ThisWorkbook/ThisOutlookSession and into a module (after removing "Handles Button1.Click" which threw an error) but it never ran when the button was clicked.

    I feel like I need to make an event handler for the button, but don't know how and couldn't find any examples. If I can just get some example VBA code I can plagiarize, I am sure I can figure out the rest.
    Last edited by Pepe Le Mokko; 01-02-2020 at 04:53 AM. Reason: Removed unnecessary title part

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: need basic help with Custom Task Pane

    https://docs.microsoft.com/en-us/arc...code-with-vsto

    Looks like you would use the applications Run command
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    11-28-2005
    Location
    Saint Louis, Missouri USA
    MS-Off Ver
    2016
    Posts
    69

    Re: need basic help with Custom Task Pane

    Andy, Applications.Run does not work with Outlook. While my project involves Outlook-Excel integration, I should have put this question in an Outlook area. I have tabled this project in favor of another, but when I get it figured out I will post it here.

    I love your ribbon editor, by the way. I use it all the time for Excel, or to grab some XML for ribbon controls for Outlook, etc. Are you working on any interesting projects?

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: need basic help with Custom Task Pane

    Looks like you can call code in the ThisOutlookSession object.
    Or by using a temporary button on the old commandbar object, which has an execute method.

    Nothing interesting on my horizon at the moment, work in all consuming

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Custom task pane - vb.net
    By kimrh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-05-2016, 07:42 AM
  2. Get Task Pane
    By Nancy Alman in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 07-10-2006, 03:29 AM
  3. Task pane
    By Michael Blench in forum Excel General
    Replies: 2
    Last Post: 02-17-2006, 03:25 AM
  4. [SOLVED] task pane
    By Diane in forum Excel General
    Replies: 2
    Last Post: 11-25-2005, 01:55 PM
  5. [SOLVED] task pane
    By Diane in forum Excel General
    Replies: 0
    Last Post: 11-25-2005, 01:15 PM
  6. Task Pane
    By Saxon in forum Excel General
    Replies: 5
    Last Post: 10-15-2005, 09:05 PM
  7. Is it possible to create a custom Task Pane view?
    By Moses Bunting in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-29-2005, 05:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1