Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6871555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:49:13+00:00 2026-05-27T03:49:13+00:00

I am building a Outlook 2007 Addin using with VS2008 using IRibbonExtensibility. My simple

  • 0

I am building a Outlook 2007 Addin using with VS2008 using IRibbonExtensibility.

My simple ribbon displays on a MailItem and has a editBox and a button control. Required functionality is that the user enters a number in the editBox, then clicks the button. The email message is then saved into a third party system (using the number entered in the editBox as a “primary key” to control location etc)

I am stuck at the point of accessing the value the user has entered into the editBox from the callback function of the button.

I have the follow markup

      <editBox
            id="FileNumber"
            maxLength="6"
            label="File No"
            />

      <button
            id="AddEmailTo"
            label="Save to"
            onAction ="AddEmailToButton_Action"
          />
    </group>
  </tab>

And the following callback

public void AddEmailToButton_Action (Microsoft.Office.Core.IRibbonControl p_Control)
{

        //what do I need to add here to access the value in the editBox?
    }

Thanks
andrew

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:49:14+00:00Added an answer on May 27, 2026 at 3:49 am

    You need to store the value in a private variable with the callback onChange

    In your class, declare a private variable to store the value of the editbox.
    This variable will allow you to get the value of a textbox.

    private string FileNumberText = "initial value";
    

    To initialise a defaut value, use getText callback

    public string onGetText(IRibbonControl control) 
    {   
    switch (control.Id)
    {
        case "FileNumber":                      
            return FileNumberText ; 
        case "editBox02":
            return "...";
        default:
            return "";
    }               
    }
    

    To record the change of editbox (pass the editbox value to the store variable)

            // Recupere le contenu du controle editBox dans la variable Cible
            public void  RecupDonnee(IRibbonControl control, String Text)
            {
                switch (control.Id)
                {
                    case "FileNumber":                      
                        FileNumberText = Text.Trim() ;  
                        break;
                    case "editBox02":
                        Screen2 = Text.Trim() ; 
                        break;
                }       
            }
    

    In your ribbon XAML

    <editBox 
     id="FileNumber"
     maxLength="6"
     label="File No"                 
     getText="onGetText"
     onChange="RecupDonnee"
     screentip="Tip" 
    />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting this error when building a setup project for an outlook 2007 addin
I've been experimenting with building an Outlook 2010 addin in C#, using Visual Studio
I'm building an Outlook 2010 add-in that will tie into our ticketing system using
i'm building a wpf control based on the outlook calender sample in code project,
I am building a html email. it looks fine in outlook 2003, outlook 2007,
I'm building an outlook addin, and I was wondering if there was any standard
I am building a Setup Package using VS2008. This is a regular setup package
I am building an Outlook 2010 addin to integrate it with some business software
Building on what has been written in SO question Best Singleton Implementation In Java
building a site using PHP and MySQL that needs to store a lot of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.