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 script works in 2000 but not 2003



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old January 16th 08, 04:36 PM posted to microsoft.public.outlook.program_forms
[email protected]
external usenet poster
 
Posts: 14
Default Outlook script works in 2000 but not 2003

Hi

We use a custom for that has worked with no problems for many months.
However, some users have now moved on to using Outlook 2003. These
users get an error message on a particular line of code when opening
the form.

It is an Object Required error and is on the line:

set HRcts = ins.modifiedformpages("HR").controls


As I mentioned, this works correctly in Outlook 2000, but not 2003.
Interestingly, there are other "set" commands for other pages in the
form that do not cause errors either in 2000 or 2003. Here is the
code up to that point for reference:

dim ins
dim cts
dim wsh
dim xls
dim xl2
dim HRcts
dim LDcts
dim MOBcts
dim OTHcts
dim XLAppFx


Function Item_Open()

set ins = item.getinspector
ins.hideformpage("HR")
ins.hideformpage("Job Desc / Justification")

set cts = ins.modifiedformpages("Message").controls
set xls = GetObject("\\libsppfps002.uk.liberata.net\procurem ent
\ProcurementFormData.xls")
set wsh = xls.worksheets("BusArea")
for each r in wsh.usedrange.rows
cts("cmbBusinessArea").additem r.range("A1").value
next ' r
cts("cmbBusinessArea").listindex = cts("txtBusinessArea").value
cts("cmbBusinessCentre").listindex = cts("txtBusinessCentre").value
cts("cmbOperatingUnit").listindex = cts("txtOperatingUnit").value

ins.SetCurrentFormPage("Message")


set xls = GetObject("\\libsppfps002.uk.liberata.net\procurem ent
\ProcurementFormData.xls")

set wsh = xls.worksheets("Clients")
for each r2 in wsh.usedrange.rows
cts("cmbRecharge3").additem r2.range("A1").value
next ' r2

cts("cmbRecharge3").listindex = cts("txtRecharge").value

ins.SetCurrentFormPage("Message")

set HRcts = ins.modifiedformpages("HR").controls


I would be very grateful for any help on this.

Regards

Adam
 




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 2000 works but not Outlook 2002 Robert Judge Outlook - Installation 2 July 2nd 07 01:00 AM
OE keeps asking to insert M.S.works 2000, looking wks2000.msi file nizora Outlook Express 6 June 17th 07 02:50 AM
Office 2003 works but not outlook Jeannie Outlook - Installation 1 December 15th 06 10:13 AM
How Outlook 2003 Stssync works Pavel Shilov Outlook - Using Contacts 5 March 15th 06 04:21 PM
Outlook form works on 2003 but not on 2000 Christian Kjær Outlook - Using Forms 2 January 20th 06 09:48 AM


All times are GMT +1. The time now is 12:42 AM.


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.