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

Outlook 2002 Custom Form only runs code if you select "run this fo



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 6th 09, 07:04 PM posted to microsoft.public.outlook.program_forms
Richard Korinek
external usenet poster
 
Posts: 2
Default Outlook 2002 Custom Form only runs code if you select "run this fo

I am well versed in a number of scripting technologies, but I'm having
difficulty with my first custom form. I have an HTA which gathers data, and
populates a custom form. I cannot via code change any control properties and
make them stick. The code for my buttons does not run at all unless I select
"run this form" which works beautifully. Code for the form is...
Function Item_Open()
Item.Recipients.Add("")
End Function

Function CommandButton1_Click()

End Function

Function CommandButton2_Click()
Set objPage = Item.GetInspector.ModifiedFormPages("PACMAN")
Set objControl = objPage.Controls("txtReject")
objControl.Visible = True
Set objControl = objPage.Controls("Label14")
objControl.Visible = True
End Function

Function CommandButton3_Click()
Set objPage = Item.GetInspector.ModifiedFormPages("PACMAN")
objPage.Controls("cmbOrg").ReadOnly = False
objPage.Controls("cmbContact").ReadOnly = False
objPage.Controls("cmbPlatform").ReadOnly = False
objPage.Controls("cmbPltfrmTp").ReadOnly = False
objPage.Controls("cmbComponent").ReadOnly = False
objPage.Controls("cmbComponentTp").ReadOnly = False
objPage.Controls("cmbPriority").ReadOnly = False
objPage.Controls("cmbCaseTp").ReadOnly = False
End Function
--
Thanks in advance for your help...

Rich
  #2  
Old February 6th 09, 07:59 PM posted to microsoft.public.outlook.program_forms
Richard Korinek
external usenet poster
 
Posts: 2
Default Outlook 2002 Custom Form only runs code if you select "run this fo

I figured out the problem. No need to reply.
--
Thanks in advance for your help...

Rich


"Richard Korinek" wrote:

I am well versed in a number of scripting technologies, but I'm having
difficulty with my first custom form. I have an HTA which gathers data, and
populates a custom form. I cannot via code change any control properties and
make them stick. The code for my buttons does not run at all unless I select
"run this form" which works beautifully. Code for the form is...
Function Item_Open()
Item.Recipients.Add("")
End Function

Function CommandButton1_Click()

End Function

Function CommandButton2_Click()
Set objPage = Item.GetInspector.ModifiedFormPages("PACMAN")
Set objControl = objPage.Controls("txtReject")
objControl.Visible = True
Set objControl = objPage.Controls("Label14")
objControl.Visible = True
End Function

Function CommandButton3_Click()
Set objPage = Item.GetInspector.ModifiedFormPages("PACMAN")
objPage.Controls("cmbOrg").ReadOnly = False
objPage.Controls("cmbContact").ReadOnly = False
objPage.Controls("cmbPlatform").ReadOnly = False
objPage.Controls("cmbPltfrmTp").ReadOnly = False
objPage.Controls("cmbComponent").ReadOnly = False
objPage.Controls("cmbComponentTp").ReadOnly = False
objPage.Controls("cmbPriority").ReadOnly = False
objPage.Controls("cmbCaseTp").ReadOnly = False
End Function
--
Thanks in advance for your help...

Rich

  #3  
Old February 6th 09, 08:10 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Outlook 2002 Custom Form only runs code if you select "run this fo

Publish the form to be able to run it correctly. If you publish it in a
folder it will be available only in that folder (never publish in more than
one place). In that folder view you can then select the form from the
Actions menu. If published in Personal Forms you select it from the Tools,
Forms menu.

Controls only retain a value if you bind them to Outlook properties, either
intrinsic or user defined.

See www.outlookcode.com for a lot more forms information.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Richard Korinek" wrote in
message ...
I am well versed in a number of scripting technologies, but I'm having
difficulty with my first custom form. I have an HTA which gathers data,
and
populates a custom form. I cannot via code change any control properties
and
make them stick. The code for my buttons does not run at all unless I
select
"run this form" which works beautifully. Code for the form is...
Function Item_Open()
Item.Recipients.Add("")
End Function

Function CommandButton1_Click()

End Function

Function CommandButton2_Click()
Set objPage = Item.GetInspector.ModifiedFormPages("PACMAN")
Set objControl = objPage.Controls("txtReject")
objControl.Visible = True
Set objControl = objPage.Controls("Label14")
objControl.Visible = True
End Function

Function CommandButton3_Click()
Set objPage = Item.GetInspector.ModifiedFormPages("PACMAN")
objPage.Controls("cmbOrg").ReadOnly = False
objPage.Controls("cmbContact").ReadOnly = False
objPage.Controls("cmbPlatform").ReadOnly = False
objPage.Controls("cmbPltfrmTp").ReadOnly = False
objPage.Controls("cmbComponent").ReadOnly = False
objPage.Controls("cmbComponentTp").ReadOnly = False
objPage.Controls("cmbPriority").ReadOnly = False
objPage.Controls("cmbCaseTp").ReadOnly = False
End Function
--
Thanks in advance for your help...

Rich


 




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
How to select a particular tab on an Outlook custom form on entry Charletonp Outlook - Using Forms 2 March 4th 08 04:50 PM
Custom "Select Names"/addressing dialog box Jason Grimme Outlook - Using Forms 1 April 30th 07 07:37 PM
Code error in custom contact form - Outlook 2003 [email protected] Outlook - Using Contacts 1 April 4th 07 02:15 PM
How to access a custom control in an outlook form from my VBA code? MeAgin Outlook and VBA 1 January 23rd 07 06:39 AM
Outlook 2003 "find" contacts doesn't work, just runs and runs Tom Stanley Outlook - Using Contacts 1 July 5th 06 04:56 AM


All times are GMT +1. The time now is 01:11 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.