Stript Outlook 2003 How save and exit a cusomized form ising a script

  • Thread starter Thread starter news.microsoft.com
  • Start date Start date
N

news.microsoft.com

Hi

I want to save save and exit a form by clicking on a button in my form , I
want to do this using a script, If some one can help....

Thk U all
 
What do you mean by exit a form? Close it?

This code runs from a command button on an Outlook custom form and saves and closes the current item:

Sub CommandButton1_Click()
Const olSave = 0
Item.Close olSave
End Sub


FYI, there is a newsgroup specifically for Outlook forms issues "down the hall" at microsoft.public.outlook.program_forms or, via web interface, at http://www.microsoft.com/office/com...spx?dg=microsoft.public.outlook.program_forms

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
I neglected to add that the Close method needs an argument:

olDiscard Discard all changes without prompting.
olPromptForSave Prompt to save or discard all changes.
olSave Save all changes without prompting.

See the Outlook VBA Help file for the numeric values for these enumerations
when using them in VBScript.
 
Tks Ms Sue,
the code work fine .

It's very hard to find Outlook Script and each time i try to make some
thing by script a spent lot of time....

where can I find many script example or "easy" tutorial with lot of
function.. ?

I'm not a programmer so it's hard for me

Sue Tks again for your GREAT help


ps: excuse my english.... ;)



"Sue Mosher [MVP-Outlook]" <[email protected]> a écrit dans le message
de %[email protected]...
What do you mean by exit a form? Close it?

This code runs from a command button on an Outlook custom form and saves and
closes the current item:

Sub CommandButton1_Click()
Const olSave = 0
Item.Close olSave
End Sub


FYI, there is a newsgroup specifically for Outlook forms issues "down the
hall" at microsoft.public.outlook.program_forms or, via web interface, at
http://www.microsoft.com/office/com...spx?dg=microsoft.public.outlook.program_forms

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
You might start at http://www.outlookcode.com/d/vbscript.htm

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers


news.microsoft.com said:
Tks Ms Sue,
the code work fine .

It's very hard to find Outlook Script and each time i try to make some
thing by script a spent lot of time....

where can I find many script example or "easy" tutorial with lot of
function.. ?

I'm not a programmer so it's hard for me

Sue Tks again for your GREAT help


ps: excuse my english.... ;)



"Sue Mosher [MVP-Outlook]" <[email protected]> a écrit dans le message
de %[email protected]...
What do you mean by exit a form? Close it?

This code runs from a command button on an Outlook custom form and saves and
closes the current item:

Sub CommandButton1_Click()
Const olSave = 0
Item.Close olSave
End Sub


FYI, there is a newsgroup specifically for Outlook forms issues "down the
hall" at microsoft.public.outlook.program_forms or, via web interface, at
http://www.microsoft.com/office/com...spx?dg=microsoft.public.outlook.program_forms

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers


news.microsoft.com said:
Hi

I want to save save and exit a form by clicking on a button in my form , I
want to do this using a script, If some one can help....

Thk U all
 
Back
Top