A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Problem with custom form after drag and drop (security related?)



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 15th 07, 02:33 PM posted to microsoft.public.outlook.program_forms
AlanGlover
external usenet poster
 
Posts: 11
Default Problem with custom form after drag and drop (security related?)

I've added a custom form to an appointment item. It collects some extra
information about the appointment from the user and stores it in a SQL
database (along with the appt times etc...).
It works fine. If the user drags and drops the meeting to a new time I want
to update my database. So I catch the item_Write event, I can tell when its a
drag/drop save because my form isn't loaded. I get an itemInspector and call
its Activate method to get my form code loaded. I pass a parameter to tell my
code its a dragdrop and my code saves the new times to the database. This all
works fine. However at the end of it all Outlook stops letting my custom
form load for that item if I try to open it again: I get the following error:

"ERROR: To help prevent malicious code from running, one or more objects in
this form were not loaded. For more information, contact your administrator."

Could it be that I need to close the item more tidily somehow?

Ads
  #2  
Old November 15th 07, 05:25 PM posted to microsoft.public.outlook.program_forms
AlanGlover
external usenet poster
 
Posts: 11
Default Problem with custom form after drag and drop (security related?)



"AlanGlover" wrote:

I've added a custom form to an appointment item. It collects some extra
information about the appointment from the user and stores it in a SQL
database (along with the appt times etc...).
It works fine. If the user drags and drops the meeting to a new time I want
to update my database. So I catch the item_Write event, I can tell when its a
drag/drop save because my form isn't loaded. I get an itemInspector and call
its Activate method to get my form code loaded. I pass a parameter to tell my
code its a dragdrop and my code saves the new times to the database. This all
works fine. However at the end of it all Outlook stops letting my custom
form load for that item if I try to open it again: I get the following error:

"ERROR: To help prevent malicious code from running, one or more objects in
this form were not loaded. For more information, contact your administrator."

Could it be that I need to close the item more tidily somehow?

  #3  
Old November 15th 07, 05:30 PM posted to microsoft.public.outlook.program_forms
AlanGlover
external usenet poster
 
Posts: 11
Default Problem with custom form after drag and drop (security related?)


I've discovered that the error is caused by my form being regarded as a "One
- off". This actually occurs when I add a userproperty to the item. You can
tell this has happened because the item.MessageClass changes from
"item.appointment.myform" to "item.appointmentItem". So you can't add
userproperties.

I still need to find a way to mark the item temporarily as having been
drag-dropped so my item_Open code can perform a different action from the
normal open. Any ideas how I can do this?


  #4  
Old November 15th 07, 05:41 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Problem with custom form after drag and drop (security related?)

Answered at http://www.outlookcode.com/threads.a...essageid=24849

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"AlanGlover" wrote in message ...

I've discovered that the error is caused by my form being regarded as a "One
- off". This actually occurs when I add a userproperty to the item. You can
tell this has happened because the item.MessageClass changes from
"item.appointment.myform" to "item.appointmentItem". So you can't add
userproperties.

I still need to find a way to mark the item temporarily as having been
drag-dropped so my item_Open code can perform a different action from the
normal open. Any ideas how I can do this?


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook Drag Drop [email protected] Add-ins for Outlook 0 March 27th 07 07:37 AM
Help: Drag & Drop messages Bertoldo Outlook Express 10 August 25th 06 04:12 AM
Drop and Drag Michelle Bush Outlook Express 7 August 7th 06 11:09 PM
drag and drop Michael Outlook - Calandaring 2 July 13th 06 12:09 AM
Can not Drag and Drop when using imap [email protected] Outlook - General Queries 0 February 7th 06 02:47 PM


All times are GMT +1. The time now is 05:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.