Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / April 2007

Tip: Looking for answers? Try searching our database.

HELP! Custom Form Events

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Lane - 25 Apr 2007 18:12 GMT
Below is code I have in a custom Outlook (2003) form but it doesn't fire
when I change or click into the Subject field or any field. Does "Item" have
to be defined or something? I followed the example in KB article 171246. The
form is invoked from an .oft file. The code was inserted in the Script Editor.
Thanks.

Sub Item_PropertyChange (ByVal myPropertyName)
msgbox "here1"
If myPropertyName = "Subject" then
    msgbox "hello - Subject"
End if
Sue Mosher [MVP-Outlook] - 25 Apr 2007 19:19 GMT
Code runs only on published forms, not on items created with an .oft file.

Item is an intrinsic object in Outlook form VBScript code.

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/community/en-us/default.mspx?dg=microsoft.public
.outlook.program_forms


Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx
 

> Below is code I have in a custom Outlook (2003) form but it doesn't fire
> when I change or click into the Subject field or any field. Does "Item" have
[quoted text clipped - 7 lines]
>  msgbox "hello - Subject"
> End if
John Lane - 25 Apr 2007 20:38 GMT
So will code run if I publish it then export it? Thanks.

> Code runs only on published forms, not on items created with an .oft file.
>
[quoted text clipped - 13 lines]
> >  msgbox "hello - Subject"
> > End if
Sue Mosher [MVP-Outlook] - 26 Apr 2007 03:15 GMT
Export? Sorry, I don't know what you mean in this context.

Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx
 

> So will code run if I publish it then export it? Thanks.
>
[quoted text clipped - 15 lines]
>> >  msgbox "hello - Subject"
>> > End if
John Lane - 26 Apr 2007 13:36 GMT
Sorry. Meant "Save As" on the File pull down. Thanks for the heads up on
forms. Was in here as I was fooling with VB, so figured this was the place to
put my question.

> Export? Sorry, I don't know what you mean in this context.
>
[quoted text clipped - 17 lines]
> >> >  msgbox "hello - Subject"
> >> > End if
Sue Mosher [MVP-Outlook] - 26 Apr 2007 14:27 GMT
Code will run only on items created from a published form. I don't see how Save As fits into your scenario.

Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx
 

> Sorry. Meant "Save As" on the File pull down. Thanks for the heads up on
> forms. Was in here as I was fooling with VB, so figured this was the place to
[quoted text clipped - 19 lines]
>> >> >  msgbox "hello - Subject"
>> >> > End if
John Lane - 26 Apr 2007 18:22 GMT
Well, I publish it, then save it to the .oft file. It was the only way I
could figure out
how to make an .oft file out of the published form. But you're right, it
didn't work. And in corporate America, user departments don't have the
permission to publish a form to a public folder.

> Code will run only on items created from a published form. I don't see how Save As fits into your scenario.
>
[quoted text clipped - 21 lines]
> >> >> >  msgbox "hello - Subject"
> >> >> > End if
Sue Mosher [MVP-Outlook] - 26 Apr 2007 21:30 GMT
Saving it to the .oft file makes a backup copy of the published form, but doesn't give you anything to put into production. What you must use to create new items is the published form. If you can't publish it to an appropriate location (and we don't know what that is, because you haven't said what kind of form it is), then an Outlook custom form is not a viable solution for your scenario (which you also haven't described).

Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx
 

> Well, I publish it, then save it to the .oft file. It was the only way I
> could figure out
[quoted text clipped - 3 lines]
>
>> Code will run only on items created from a published form. I don't see how Save As fits into your scenario.

>>    
>> > Sorry. Meant "Save As" on the File pull down. Thanks for the heads up on
[quoted text clipped - 20 lines]
>> >> >> >  msgbox "hello - Subject"
>> >> >> > End if
John Lane - 27 Apr 2007 13:38 GMT
I thought forms could only be published to Exchange folders. Can they be
published to a file system file? Thanks.

> Saving it to the .oft file makes a backup copy of the published form, but doesn't give you anything to put into production. What you must use to create new items is the published form. If you can't publish it to an appropriate location (and we don't know what that is, because you haven't said what kind of form it is), then an Outlook custom form is not a viable solution for your scenario (which you also haven't described).
>
[quoted text clipped - 30 lines]
> >> >> >> >  msgbox "hello - Subject"
> >> >> >> > End if
Sue Mosher [MVP-Outlook] - 27 Apr 2007 15:18 GMT
No, forms can be published to the user's Personal Forms library, the organization's Organizational Forms library on the Exchange Server, or to a folder. Saving a form as an .oft file is not publishing it. Only published forms should be used to create new items. .oft files can server as backup copies of published forms.
Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx
 

>I thought forms could only be published to Exchange folders. Can they be
> published to a file system file? Thanks.
[quoted text clipped - 33 lines]
>> >> >> >> >  msgbox "hello - Subject"
>> >> >> >> > End if
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.