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.
 
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.
 
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.
Similar threads
Thread starter Title Forum Replies Date
M c# vsto Outlook.ApplicationEvents_11_NewMailEx Outlook VBA and Custom Forms 1
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
S HTML Code Embedded in String Within Open Outlook Email Preventing Replace(Application.ActiveInspector.CurrentItem.HTMLBody From Working Outlook VBA and Custom Forms 4
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
K Handling application.quit event Outlook VBA and Custom Forms 8
E Turn application visibility off Outlook VBA and Custom Forms 2
T Run application from cmd button Outlook VBA and Custom Forms 5
D Outlook 2007 Will Not Send Mail From C# Application Outlook VBA and Custom Forms 7
P Supporting threads in Outlook VBA application Outlook VBA and Custom Forms 1
R vba instantiated internetExplorer.application differs from user la Outlook VBA and Custom Forms 1
K How to disconnect Application.COMAddIns.Item().Object? Outlook VBA and Custom Forms 4
D outlook.exe application error - breakpoint has been reached. fix? BCM (Business Contact Manager) 1
P Drag and Drop mails from Outlook to Clarion6 Application Outlook VBA and Custom Forms 5
J Office application does not match advisory. Why? BCM (Business Contact Manager) 3
D Application.ActiveInspector() is Null on Ribbon Load Outlook VBA and Custom Forms 1
D Application.ActiveInspector().CurrentItem Returns Wrong(Old) Value Outlook VBA and Custom Forms 3
L RE: BCM Office Application Issue BCM (Business Contact Manager) 1
R Can calendar be displayed in another Office application? Outlook VBA and Custom Forms 1

Similar threads

Back
Top