![]() |
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,
in my own personalized task-form i have amongst others some VB-Script-code for the "Item_CustomPropertyChange"-event. This event will triggered when i insert or change values on my custom-fields on the personalized task-form and this is right. An application, which i have developed with VB.NET 2005 inserts or changes values on the custom-fields on the personalized task-form, too. Here the VB.NET-code: --- Dim myOlApp As New Outlook.Application Dim myNamespace As Outlook.NameSpace Dim myitem As Outlook.TaskItem myNamespace = myOlApp.GetNamespace("MAPI") myitem = myNamespace.GetItemFromID(strEntryID, objStoreID) myitem.UserProperties("MB1").Value = True myitem.Save() myNamespace = Nothing myOlApp = Nothing --- Now my question: When my VB.NET-application inserts or changes values on the custom-fields on the personalized task-form, then the VB-Script code behind the taskform will triggered, too. It is possible to prevent this comportment? The VB-Script code behind the taskform should only triggered when i insert or change values on my taskform directly. thx & bye Oskar |
#2
|
|||
|
|||
![]()
Would the user normally be able to change MB1 manually? Does the VBScript code need to handle any changes in MB1?
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Oskar Vaia" wrote in message ... Hi, in my own personalized task-form i have amongst others some VB-Script-code for the "Item_CustomPropertyChange"-event. This event will triggered when i insert or change values on my custom-fields on the personalized task-form and this is right. An application, which i have developed with VB.NET 2005 inserts or changes values on the custom-fields on the personalized task-form, too. Here the VB.NET-code: --- Dim myOlApp As New Outlook.Application Dim myNamespace As Outlook.NameSpace Dim myitem As Outlook.TaskItem myNamespace = myOlApp.GetNamespace("MAPI") myitem = myNamespace.GetItemFromID(strEntryID, objStoreID) myitem.UserProperties("MB1").Value = True myitem.Save() myNamespace = Nothing myOlApp = Nothing --- Now my question: When my VB.NET-application inserts or changes values on the custom-fields on the personalized task-form, then the VB-Script code behind the taskform will triggered, too. It is possible to prevent this comportment? The VB-Script code behind the taskform should only triggered when i insert or change values on my taskform directly. thx & bye Oskar |
#3
|
|||
|
|||
![]()
Hi Sue,
yes, the user normally would be able to change MB1 manually and the VBScript code needs to handle any changes in MB1, too. thx and bye Oskar "Sue Mosher [MVP-Outlook]" schrieb im Newsbeitrag ... Would the user normally be able to change MB1 manually? Does the VBScript code need to handle any changes in MB1? -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Oskar Vaia" wrote in message ... Hi, in my own personalized task-form i have amongst others some VB-Script-code for the "Item_CustomPropertyChange"-event. This event will triggered when i insert or change values on my custom-fields on the personalized task-form and this is right. An application, which i have developed with VB.NET 2005 inserts or changes values on the custom-fields on the personalized task-form, too. Here the VB.NET-code: --- Dim myOlApp As New Outlook.Application Dim myNamespace As Outlook.NameSpace Dim myitem As Outlook.TaskItem myNamespace = myOlApp.GetNamespace("MAPI") myitem = myNamespace.GetItemFromID(strEntryID, objStoreID) myitem.UserProperties("MB1").Value = True myitem.Save() myNamespace = Nothing myOlApp = Nothing --- Now my question: When my VB.NET-application inserts or changes values on the custom-fields on the personalized task-form, then the VB-Script code behind the taskform will triggered, too. It is possible to prevent this comportment? The VB-Script code behind the taskform should only triggered when i insert or change values on my taskform directly. thx & bye Oskar |
#4
|
|||
|
|||
![]()
In that scenario, what you could do is set another property value on the form (BillingInformation or Mileage or a custom property) and allow the script to run only when that property is not a certain value. Like this:
1) Add-in sets "check" property value to "stop" value. [could be text, Boolean, numeric, depending on what property you use] 2) Add-in changes MB1. 3) CustomPropertyChange event fires, looks at value of "check" property, and runs no more code for MB1. 4) Add-in sets "check" property to "go" value. Thus the CustomPropertyChange event would still fire, of course -- you can't prevent that -- but the script code would run only on the "go" value. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Oskar Vaia" wrote in message ... Hi Sue, yes, the user normally would be able to change MB1 manually and the VBScript code needs to handle any changes in MB1, too. thx and bye Oskar "Sue Mosher [MVP-Outlook]" schrieb im Newsbeitrag ... Would the user normally be able to change MB1 manually? Does the VBScript code need to handle any changes in MB1? -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Oskar Vaia" wrote in message ... Hi, in my own personalized task-form i have amongst others some VB-Script-code for the "Item_CustomPropertyChange"-event. This event will triggered when i insert or change values on my custom-fields on the personalized task-form and this is right. An application, which i have developed with VB.NET 2005 inserts or changes values on the custom-fields on the personalized task-form, too. Here the VB.NET-code: --- Dim myOlApp As New Outlook.Application Dim myNamespace As Outlook.NameSpace Dim myitem As Outlook.TaskItem myNamespace = myOlApp.GetNamespace("MAPI") myitem = myNamespace.GetItemFromID(strEntryID, objStoreID) myitem.UserProperties("MB1").Value = True myitem.Save() myNamespace = Nothing myOlApp = Nothing --- Now my question: When my VB.NET-application inserts or changes values on the custom-fields on the personalized task-form, then the VB-Script code behind the taskform will triggered, too. It is possible to prevent this comportment? The VB-Script code behind the taskform should only triggered when i insert or change values on my taskform directly. thx & bye Oskar |
#5
|
|||
|
|||
![]()
Hi Sue,
many thx for the tip. I have resolved the problem in similar way. I set a global variable in the item_open event. This event only fires if i open the task in outlook and not when i sets values on the task across the Add-In. bye Oskar |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Exchange 2003/Outlook 2003: VBScript-Error in personalized form | Oskar Vaia | Outlook - Using Forms | 2 | October 20th 07 08:49 AM |
Personalized mail merge using contract groups | iaconmi1 | Outlook - Using Contacts | 2 | August 18th 07 12:20 PM |
it is possible to clear the form cache of Outlook via logon script | Yahawa | Outlook and VBA | 1 | November 30th 06 05:24 PM |
Stript Outlook 2003 How save and exit a cusomized form ising a script | news.microsoft.com | Outlook and VBA | 5 | September 20th 06 12:11 AM |
Outlook form with VB script wont work | Hellstern | Outlook - Using Forms | 1 | March 31st 06 03:21 PM |