![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hi all,
I want to check the result of an action to apply the de right function, In my case I save a Task, I used a customized Form and I added a validation control on some fields = the task can't be saved if some are empty I want to know the result of this command Item.Save Tks |
#2
|
|||
|
|||
![]()
Am Wed, 18 Oct 2006 09:22:36 +0200 schrieb news.microsoft.com:
If the Save method fails it should raise an error. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.VBOffice.net -- Hi all, I want to check the result of an action to apply the de right function, In my case I save a Task, I used a customized Form and I added a validation control on some fields = the task can't be saved if some are empty I want to know the result of this command Item.Save Tks |
#3
|
|||
|
|||
![]()
Yes I that if save fails it raise an error, but in my script how can I know
if the save was successfull or not in my script I want to do this Item.Save If "the instruction was successfull " then = I don't know how to do this check do some thing else do other thing end if Thks "Michael Bauer [MVP - Outlook]" a écrit dans le message de news: ... Am Wed, 18 Oct 2006 09:22:36 +0200 schrieb news.microsoft.com: If the Save method fails it should raise an error. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.VBOffice.net -- Hi all, I want to check the result of an action to apply the de right function, In my case I save a Task, I used a customized Form and I added a validation control on some fields = the task can't be saved if some are empty I want to know the result of this command Item.Save Tks |
#4
|
|||
|
|||
![]()
Am Thu, 19 Oct 2006 10:15:25 +0200 schrieb news.microsoft.com:
For error handling in VB there are two opportunities: 1) On Error Resume Next Item.Save If Err.Number 0 Then ... ' no success 2) On Error Goto ERR_HANDLER Item.Save ' maybe more code here Exit Sub ERR_HANDLER: ' error handling here #1 tells you exactly what line caused an error even if you don´t know the error number. On the other side, if you do have more commands in the function then it can really blow up the code. #2 catches all errors even unexpected ones. You could add line numbers to your code and the Erl function would tell you which line caused the error. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.VBOffice.net -- Yes I that if save fails it raise an error, but in my script how can I know if the save was successfull or not in my script I want to do this Item.Save If "the instruction was successfull " then = I don't know how to do this check do some thing else do other thing end if Thks "Michael Bauer [MVP - Outlook]" a 袲it dans le message de news: ... Am Wed, 18 Oct 2006 09:22:36 +0200 schrieb news.microsoft.com: If the Save method fails it should raise an error. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.VBOffice.net -- Hi all, I want to check the result of an action to apply the de right function, In my case I save a Task, I used a customized Form and I added a validation control on some fields = the task can't be saved if some are empty I want to know the result of this command Item.Save Tks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom Action or Script to Purge Deleted Messages on IMAP account | Frank M. | Outlook and VBA | 9 | July 10th 09 07:44 PM |
Outlook contact to Word Mail Merge result blank line before City, State, Zip | Randy | Outlook - Using Contacts | 6 | October 5th 06 02:37 AM |
Access quey result (emails) directly loaded into Outlook "TO" fiel | MSA | Outlook - General Queries | 1 | September 27th 06 03:47 PM |
Outlook installer class with custom action | AtulSureka | Add-ins for Outlook | 0 | July 31st 06 04:39 PM |
Rule 'run a script' not running my script | [email protected] | Outlook and VBA | 3 | May 30th 06 01:09 PM |