VSTO C#: How do I declare an application scope variable?

Status
Not open for further replies.
M

Mark B

C#, VSTO, OL2007

How do I declare an application-scope variable that will last as long as the

user has Outlook open?

String myApplicationScopeString="test";

I want other class methods to read and write to it over its lifetime.
 
D

Dmitry Streblechenko

As a member of the class that implements your add-in?

Dmitry Streblechenko (MVP)

-

"Mark B" <none123@none.com> wrote in message

news:OolqkYlbKHA.5472@TK2MSFTNGP02.phx.gbl...
> C#, VSTO, OL2007

> How do I declare an application-scope variable that will last as long as
> the user has Outlook open?

> String myApplicationScopeString="test";

> I want other class methods to read and write to it over its lifetime.
 
M

Mark B

I guess ThisAddIn.cs then.

"Dmitry Streblechenko" <dmitry@dimastr.com> wrote in message

news:eo7ztzRcKHA.2188@TK2MSFTNGP04.phx.gbl...
> As a member of the class that implements your add-in?

> > Dmitry Streblechenko (MVP)
>

>

>

> -
> "Mark B" <none123@none.com> wrote in message
> news:OolqkYlbKHA.5472@TK2MSFTNGP02.phx.gbl...
> > C#, VSTO, OL2007
>

>> How do I declare an application-scope variable that will last as long as
> > the user has Outlook open?
>

>> String myApplicationScopeString="test";
>

>> I want other class methods to read and write to it over its lifetime.


>
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
T Way to avoid annoying typecasts? VSTO V3 Using Outlook 3
M Develop for OL2003 on OL2007 machine using VS2008 and VSTO? Outlook VBA and Custom Forms 1
A Not able to load an add-in for outlook 2007 developed in VSTO 2005 Outlook VBA and Custom Forms 2
E VSTO 2008 how to bind Form Region controls to Item data fields Outlook VBA and Custom Forms 2
E VSTO 2008 how to bind Form Region controls to Item data fields Outlook VBA and Custom Forms 3
T VSTO Outlook add-in: Categories not displaying correctly Outlook VBA and Custom Forms 3
O VSTO - Outlook Add-In - Get GAL data Outlook VBA and Custom Forms 1
M VSTO deployment? Outlook VBA and Custom Forms 1
K Outlook VSTO Add-in not visible in Trust Center after installing Outlook VBA and Custom Forms 1
M Will a VSTO C# Outlook 2007 Add-in work on Outlook 2010? Outlook VBA and Custom Forms 1
S VSTO calling unmanged function Outlook VBA and Custom Forms 3
X Highlight block of text in an outlook mail using c#2008 vsto Outlook VBA and Custom Forms 1
W My VSTO 3.0 Outlook addin doesn’t load Outlook VBA and Custom Forms 1
G Interop or VSTO or ? Outlook VBA and Custom Forms 2
M VSTO 2007 Addin auto-disabled on one machine but not another on installation? Outlook VBA and Custom Forms 1
N VSTO outlook 2007 addin installation problem Outlook VBA and Custom Forms 1
O Third-party VSTO 2005 SE plug-in for Outlook 2007: what should I signwith a publisher certificate? Outlook VBA and Custom Forms 3
O Outlook VSTO 2005 plug-in installer: CLSID = ? Outlook VBA and Custom Forms 3
O using VSTO to get Available Mailboxes Outlook VBA and Custom Forms 11
M Outlook2007 and VSTO, handle the Click on the Save Button in the IPM.Note dialog HOWTO? Outlook VBA and Custom Forms 4
M VSTO Outlook2007 Addin. After switching from 3.5 to 2.0 Framework i get "'MSB3185: EntryPoint not sp Outlook VBA and Custom Forms 1
E Opening WinForm in Outlook 2003 VSTO Addin with Wordmail enabled Outlook VBA and Custom Forms 1
C Problem installing VSTO AddIn on Vista Outlook VBA and Custom Forms 3
bmtjedi Set objApp = Application Not Working in O365-32bit Using Outlook 1
avant-guvnor Outlook.Application now produces error Outlook VBA and Custom Forms 5
C Custom Application Form send Email to Another User Using Outlook 1
N Select Existing BCM Business Contact in C# application Using Outlook 0
S Using "start application" rule action Using Outlook 2
smokiibear windows security mail application not accepting username and password Using Outlook 0
Y VBA - Application Filedialog Hidden Behind Outlook Using Outlook 0
T Synchronize outlook appointments through web application. Using Outlook 1
O Outlook 2010 Stops Working When Accounting Application Tries To Send eMail Using Outlook 4
C MAPI to access a 64 bit Outlook from a 32 bit application; or access via ODBC Using Outlook 0
J Delays when changing from one application to another in Outlook Using Outlook 2
T How can I send e-mail from an Access 2010 application using Outlook not CDO Using Outlook 1
P All of a sudden I cannot open the INBOX file. It asks me to close any application and restart. Done that several times. Nothing Using Outlook 1
M Determine if a public Folder is used by an Application Using Outlook 2
U How do I copy my address book in a vcard application? Using Outlook 1
M Server Error in '/FacilityService' Application. Exchange Server Administration 3
B Identify SMTP email submitted from IP or Application for rule creation? Exchange Server Administration 7
S incompatible application cannot open hyperlinks in email messages__ Using Outlook 2
B OUTLOOK 2010 Set up wrong and now can't open application to fix it... Using Outlook 1
H Importing Unread emails to a 3rd party Application - Civica Using Outlook 1
K Outlook 2007 - error opening the application Using Outlook 1
B Microsoft Visual C++ Runtime Library message, "This application has requested the Runtime to termina Using Outlook 1
A Access 64 bit Outlook 2010 from 32 bit C++ application Using Outlook 1
N Business Application for Master Category List in 2010 Outlook's Business Contact Manager Using Outlook 1
D An error in the transmission of the command to the application Using Outlook 1
U Outlook 2003- Incompatible Application - Using Outlook 1
S Error 'outlook cannot launch an application to handle d:\xxxxxx' when try to insert file. Using Outlook 1
Similar threads


















































Top