none
How to access items from ThisAddin to Ribbon.cs RRS feed

  • Question

  • Hello

    I'm a beginner on outlook add in, I'm using c# on vs 2010, I want to know how to access items from ThisAddin class to Ribbon class.

    The problem ist that I use a streamreader to read a file.txt in ThisAddin.cs, and I also use it so read it three times in Ribbon.cs

    How should I do to read it once in ThisAddin and use in this class and in Ribbon class items in this file?

    Thnaks a lot

    Thursday, September 19, 2013 3:07 PM

Answers

  • Are you asking how to use text you read from a Streamreader object in multiple places in your code? If that's the question, get the Streamreader output as a string and put it in a global string variable that you can access from anywhere in your project.

    If that's not the question then please explain exactly what you are asking.


    Ken Slovak MVP - Outlook

    • Marked as answer by suki_11 Monday, September 23, 2013 8:15 AM
    Friday, September 20, 2013 2:40 PM

All replies

  • Are you asking how to use text you read from a Streamreader object in multiple places in your code? If that's the question, get the Streamreader output as a string and put it in a global string variable that you can access from anywhere in your project.

    If that's not the question then please explain exactly what you are asking.


    Ken Slovak MVP - Outlook

    • Marked as answer by suki_11 Monday, September 23, 2013 8:15 AM
    Friday, September 20, 2013 2:40 PM
  • Hi,

    Thanks for the answer

    I solved my problem with this way

    Monday, September 23, 2013 8:15 AM