How to know if a Form.Close Event is the result of canceling

  • Thread starter Thread starter escamoteur
  • Start date Start date
Status
Not open for further replies.
E

escamoteur

Hi,

I would like to know how can I detect it a user clicked the close button on the titlebar or if the inspector was closed after it's

item was saved. Unfortunately the Close-Events do not provide any information why they are fired.

I use Outlook2007

Best

Tom
 
Handle the Write() event, which fires when an item is saved. You can also

check the Saved status of the item.

"escamoteur" <mail@burkharts.net> wrote in message

news:A3FD6BEA-3A5F-4F36-89BF-60FCD7FA9174@microsoft.com...
> Hi,

> I would like to know how can I detect it a user clicked the close button
> on the titlebar or if the inspector was closed after it's item was saved.
> Unfortunately the Close-Events do not provide any information why they are
> fired.

> I use Outlook2007
> Best
> Tom
 
My problem is that I have some fields that have to be saved too but that are not mapped to any Item Fields. if only they are changed

I don't get a WriteEvent when closing an item. Also the Saved Status does not change if only one of the unbound Controls have

changed.

Unfortunately it seems that the "Saved" status is read only so you can't mark an item as "unsaved".

I know use a crued work arround. As soon as a control changes that should also set the Item in "unsaved" state I know write to not

used Datafield of the item ans I restore the original value a moment later.

So even if none of the bound controls don't change I can use the"Write Event" to store my unbound data if it was modified.

Best

Tom
<kenslovak@mvps.org> schrieb im Newsbeitrag news:uTRmVMPJKHA.1336@TK2MSFTNGP05.phx.gbl...
> Handle the Write() event, which fires when an item is saved. You can also check the Saved status of the item.

> >

>

> "escamoteur" <mail@burkharts.net> wrote in message news:A3FD6BEA-3A5F-4F36-89BF-60FCD7FA9174@microsoft.com...
> > Hi,
>

>> I would like to know how can I detect it a user clicked the close button on the titlebar or if the inspector was closed after
> > it's item was saved. Unfortunately the Close-Events do not provide any information why they are fired.
>

>> I use Outlook2007
> > Best
> > Tom

>
 
Why are you using unbound controls at all? Bind the controls to some fields

and get rid of the problem.

"escamoteur" <mail@burkharts.net> wrote in message

news:0CA647FD-E9A9-48BA-941C-25A2E2C29F7C@microsoft.com...
> My problem is that I have some fields that have to be saved too but that
> are not mapped to any Item Fields. if only they are changed I don't get a
> WriteEvent when closing an item. Also the Saved Status does not change if
> only one of the unbound Controls have changed.
> Unfortunately it seems that the "Saved" status is read only so you can't
> mark an item as "unsaved".

> I know use a crued work arround. As soon as a control changes that should
> also set the Item in "unsaved" state I know write to not used Datafield
> of the item ans I restore the original value a moment later.
> So even if none of the bound controls don't change I can use the"Write
> Event" to store my unbound data if it was modified.

> Best
> Tom
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
R Outlook 2003 - Close parent form before opening child form Outlook VBA and Custom Forms 4
V Outlook Form ListBox is not editable Outlook VBA and Custom Forms 2
boblewis Technical Issue with Custom Form - Save to Drafts Not Syncing Outlook VBA and Custom Forms 1
G Apply Custom Contacts form to all existing Contacts Outlook VBA and Custom Forms 1
G Add Map It button to Custom Contacts Form in Outlook Outlook VBA and Custom Forms 1
G Outlook 2021 Add Picture to Custom Contact Form Outlook VBA and Custom Forms 2
P Can't add custom field to custom Outlook form, it always adds to the Folder instead Outlook VBA and Custom Forms 2
AndyZ Contact Custom Form Tiny Text Outlook VBA and Custom Forms 3
A How to reduce size of custom contact form? Outlook VBA and Custom Forms 3
L Applying new form to existing contacts -- MessageClass Outlook VBA and Custom Forms 3
Witzker How to get the button Karte ( map) in custom contact form Outlook VBA and Custom Forms 2
B Outlook 2019 Custom Email form - Edit default email form Outlook VBA and Custom Forms 6
C Populate form data into message body Outlook VBA and Custom Forms 1
Witzker Outlook 2019 How to get a Photo in a User Defined Contact form Outlook VBA and Custom Forms 2
Witzker Outlook 2019 Macro to send an Email Template from User Defined Contact Form Outlook VBA and Custom Forms 0
Witzker Set Cursor & Focus from any field to the body of a user Contact form in OL 2019 Outlook VBA and Custom Forms 1
Witzker Place cursor at opening, a user defined OL contact form Outlook VBA and Custom Forms 2
T Customized form: The Forward option shows write layout Outlook VBA and Custom Forms 0
T 1:1 Datatransfer from incoming mail body to customs form body Outlook VBA and Custom Forms 0
V Latest Changes to form not appearing for some users Outlook VBA and Custom Forms 3
J Does the .fdm contain my custom form? How to make ol use it? - ol2007 Outlook VBA and Custom Forms 4
J ol2021 custom form not displaying pics Outlook VBA and Custom Forms 37
bdsermons Outlook 365 command button in outlook form Outlook VBA and Custom Forms 5
wayneame Changing the Form Used by Existing Task Items in a Folder Outlook VBA and Custom Forms 4
N Contact Form Notes Field Touch vs Mouse Using Outlook 0
cbufacchi Outlook 365 Populate custom Outlook Appoint form Outlook VBA and Custom Forms 2
C Create Meeting With Custom Form Outlook VBA and Custom Forms 2
W Designer Form 2013 and Script ? how ? Outlook VBA and Custom Forms 1
J Read Outlook Form fields Outlook VBA and Custom Forms 3
V Compound IF, OR, AND in Outlook form Outlook VBA and Custom Forms 4
J custom form not displaying pictures Outlook VBA and Custom Forms 7
I Button PDF in Outlook Contact custom form Outlook VBA and Custom Forms 1
K Font Sizing in Custom Form Regions for Contacts Outlook VBA and Custom Forms 1
V Validating Outlook form with "OR" and "AND" Outlook VBA and Custom Forms 1
A How to stop user form from disapearing once mail window is closed? Outlook VBA and Custom Forms 0
K can't get custom form to update multiple contacts using VBA Outlook VBA and Custom Forms 3
V Form data not sending for some users Outlook VBA and Custom Forms 2
H Custom Outlook Contact Form VBA Outlook VBA and Custom Forms 1
Witzker HowTo Change message Class of contact form Outlook VBA and Custom Forms 0
A VBscript stops running after updating form Outlook VBA and Custom Forms 1
Witzker HowTo start a macro with an Button in OL contact form Outlook VBA and Custom Forms 12
D Emailed form is blank Outlook VBA and Custom Forms 0
F Validation on custom task form after task acceptance Outlook VBA and Custom Forms 1
C Add Form to Appointments Received, Automatically Outlook VBA and Custom Forms 6
V Date and/or time error in Outlook Form Outlook VBA and Custom Forms 0
A Form Position with Dual Monitors Outlook VBA and Custom Forms 2
I Error saving screenshots in a custom form in outlook 2016, outlook 365 - ok in outlook 2013, outlook 2010 Outlook VBA and Custom Forms 5
M VbScript for Command Button on Contacts Custom Form Using Outlook 1
G Other users can't see P.2 with custom fields in Form Outlook VBA and Custom Forms 0
O Create a custom contact form - questions before messing things up... Outlook VBA and Custom Forms 4

Similar threads

Back
Top