Error in Code

Following is some VBS code I have in my Custom Form developed in Outlook 
2003.  Line 61 is giving me an error stating:

Object doesn't support this property or method: 
'Item.GetInspector.ModifiedFormPages'
Line No: 61

If you look Line 51 is the same method and it works fine. The funny thing is 
when I run the code, I get the error, I continue on to the Form, and the 
code after it works.  The code that follows line 61 is dependent on line 61 
as evident by if I ' comment it out, I get a separate error asking for 
objPage2.  The code also works if I change the value of one of the 
subsequent (to line 61) objects to make the If statement true, the "Then" 
happens.

It was working before, before that mysterious 3/10 disappearance of my code, 
so I can't figure out why it's not working now.  Thanks for any help.

Function Item_Open()
 Set myNameSpace = Application.GetNameSpace("MAPI")
 Item.UserProperties("LoggedIn")=myNameSpace.CurrentUser
'Line 4
if Item.UserProperties("OrderOwner")="--" Then
 Item.UserProperties("OrderOwner")=myNameSpace.CurrentUser
end If
'Line 8
 Set objPage0 = Item.GetInspector.ModifiedFormPages("Finance")
 Set objControl0 = objPage0.Controls("CreditApproval")
 Set objControl1 = objPage0.Controls("OrderSizeApproval")
 Set objControl2 = objPage0.Controls("ContractApproval")
 Set objControl3 = objPage0.Controls("QCApproval")
'Line 14
if Item.UserProperties("LoggedIn")="Mike Green" Then
 objControl0.Locked = False
 objControl1.Locked = False
 objControl2.Locked = False
 objControl3.Locked = False
elseif Item.UserProperties("LoggedIn")="Katherine Nelson-Daigle" Then
 objControl0.Locked = False
 objControl1.Locked = False
 objControl2.Locked = False
elseif Item.UserProperties("LoggedIn")="Tim Slevin" Then
 objControl1.Locked = False
 objControl2.Locked = False
elseif Item.UserProperties("LoggedIn")="Neen Zimmerman" Then
 objControl0.Locked = False
elseif Item.UserProperties("LoggedIn")="Lian Hu" Then
 objControl0.Locked = False
elseif Item.UserProperties("LoggedIn")="Chris Lundren" Then
 objControl1.Locked = False
elseif Item.UserProperties("LoggedIn")="Kirstie Nystedt" Then
 objControl3.Locked = False
elseif Item.UserProperties("LoggedIn")="Wade Gordon" Then
 objControl3.Locked = False
end If
'Line 38
 Set objPage1 = Item.GetInspector.ModifiedFormPages("SalesSupport")
 Set objControl4 = objPage1.Controls("CSMgrApproval")
'Line 41
if Item.UserProperties("LoggedIn")="Veronica Eggers" Then
 objControl4.Locked = False
end If
'Line 45
End Function
'Line 47
'Line 48
'Line 49
Sub Item_CustomPropertyChange(ByVal Name)
 Set objPage1 = Item.GetInspector.ModifiedFormPages("SalesSupport")
 Set objControl1a = objPage1.Controls("CSMgrApproval")
 Set objControl2a = objPage1.Controls("CSMgrApprovalStore")
 Set objControl3a = objPage1.Controls("CSMgrApprovalDate")
'Line 55
if objControl1a <> objControl2a Then
 objControl3a.Value = Now()
 objControl2a.Value = objControl1a.Value
end If
'Line 60
 Set objPage2 = Item.GetInspector.ModifiedFormPages("Finance")
 Set objControl1b = objPage2.Controls("CreditApproval")
 Set objControl2b = objPage2.Controls("CreditApprovalStore")
 Set objControl3b = objPage2.Controls("CreditApprovalDate")
'Line 65
if objControl1b <> objControl2b Then
 objControl3b.Value = Now()
 objControl2b.Value = objControl1b.Value
end If
'Line 70
 Set objControl1c = objPage2.Controls("ContractApproval")
 Set objControl2c = objPage2.Controls("ContractApprovalStore")
 Set objControl3c = objPage2.Controls("ContractApprovalDate")

'Line 75
if objControl1c <> objControl2c Then
 objControl3c.Value = Now()
 objControl2c.Value = objControl1c.Value
end If
'Line 80
 Set objControl1d = objPage2.Controls("QCApproval")
 Set objControl2d = objPage2.Controls("QCApprovalStore")
 Set objControl3d = objPage2.Controls("QCApprovalDate")

'Line 85
if objControl1d <> objControl2d Then
 objControl3d.Value = Now()
 objControl2d.Value = objControl1d.Value
end If
'Line 90
 Set objControl1e = objPage2.Controls("OrderSizeApproval")
 Set objControl2e = objPage2.Controls("OrderSizeApprovalStore")
 Set objControl3e = objPage2.Controls("OrderSizeApprovalDate")

'Line 95
if objControl1e <> objControl2e Then
 objControl3e.Value = Now()
 objControl2e.Value = objControl1e.Value
end If
End Sub 


0
Chaney34 (30)
3/12/2005 12:20:26 AM
outlook 87535 articles. 11 followers. Follow

1 Replies
685 Views

Similar Articles

[PageSpeed] 18

Also it works in Line 9 -- same Property and same Method.  Please help. 
Thanks in Advance.

"Micah Chaney" <Chaney34@OfficeDiscussions.com> wrote in message 
news:OW5dLlpJFHA.3960@TK2MSFTNGP09.phx.gbl...
> Following is some VBS code I have in my Custom Form developed in Outlook 
> 2003.  Line 61 is giving me an error stating:
>
> Object doesn't support this property or method: 
> 'Item.GetInspector.ModifiedFormPages'
> Line No: 61
>
> If you look Line 51 is the same method and it works fine. The funny thing 
> is when I run the code, I get the error, I continue on to the Form, and 
> the code after it works.  The code that follows line 61 is dependent on 
> line 61 as evident by if I ' comment it out, I get a separate error asking 
> for objPage2.  The code also works if I change the value of one of the 
> subsequent (to line 61) objects to make the If statement true, the "Then" 
> happens.
>
> It was working before, before that mysterious 3/10 disappearance of my 
> code, so I can't figure out why it's not working now.  Thanks for any 
> help.
>
> Function Item_Open()
> Set myNameSpace = Application.GetNameSpace("MAPI")
> Item.UserProperties("LoggedIn")=myNameSpace.CurrentUser
> 'Line 4
> if Item.UserProperties("OrderOwner")="--" Then
> Item.UserProperties("OrderOwner")=myNameSpace.CurrentUser
> end If
> 'Line 8
> Set objPage0 = Item.GetInspector.ModifiedFormPages("Finance")
> Set objControl0 = objPage0.Controls("CreditApproval")
> Set objControl1 = objPage0.Controls("OrderSizeApproval")
> Set objControl2 = objPage0.Controls("ContractApproval")
> Set objControl3 = objPage0.Controls("QCApproval")
> 'Line 14
> if Item.UserProperties("LoggedIn")="Mike Green" Then
> objControl0.Locked = False
> objControl1.Locked = False
> objControl2.Locked = False
> objControl3.Locked = False
> elseif Item.UserProperties("LoggedIn")="Katherine Nelson-Daigle" Then
> objControl0.Locked = False
> objControl1.Locked = False
> objControl2.Locked = False
> elseif Item.UserProperties("LoggedIn")="Tim Slevin" Then
> objControl1.Locked = False
> objControl2.Locked = False
> elseif Item.UserProperties("LoggedIn")="Neen Zimmerman" Then
> objControl0.Locked = False
> elseif Item.UserProperties("LoggedIn")="Lian Hu" Then
> objControl0.Locked = False
> elseif Item.UserProperties("LoggedIn")="Chris Lundren" Then
> objControl1.Locked = False
> elseif Item.UserProperties("LoggedIn")="Kirstie Nystedt" Then
> objControl3.Locked = False
> elseif Item.UserProperties("LoggedIn")="Wade Gordon" Then
> objControl3.Locked = False
> end If
> 'Line 38
> Set objPage1 = Item.GetInspector.ModifiedFormPages("SalesSupport")
> Set objControl4 = objPage1.Controls("CSMgrApproval")
> 'Line 41
> if Item.UserProperties("LoggedIn")="Veronica Eggers" Then
> objControl4.Locked = False
> end If
> 'Line 45
> End Function
> 'Line 47
> 'Line 48
> 'Line 49
> Sub Item_CustomPropertyChange(ByVal Name)
> Set objPage1 = Item.GetInspector.ModifiedFormPages("SalesSupport")
> Set objControl1a = objPage1.Controls("CSMgrApproval")
> Set objControl2a = objPage1.Controls("CSMgrApprovalStore")
> Set objControl3a = objPage1.Controls("CSMgrApprovalDate")
> 'Line 55
> if objControl1a <> objControl2a Then
> objControl3a.Value = Now()
> objControl2a.Value = objControl1a.Value
> end If
> 'Line 60
> Set objPage2 = Item.GetInspector.ModifiedFormPages("Finance")
> Set objControl1b = objPage2.Controls("CreditApproval")
> Set objControl2b = objPage2.Controls("CreditApprovalStore")
> Set objControl3b = objPage2.Controls("CreditApprovalDate")
> 'Line 65
> if objControl1b <> objControl2b Then
> objControl3b.Value = Now()
> objControl2b.Value = objControl1b.Value
> end If
> 'Line 70
> Set objControl1c = objPage2.Controls("ContractApproval")
> Set objControl2c = objPage2.Controls("ContractApprovalStore")
> Set objControl3c = objPage2.Controls("ContractApprovalDate")
>
> 'Line 75
> if objControl1c <> objControl2c Then
> objControl3c.Value = Now()
> objControl2c.Value = objControl1c.Value
> end If
> 'Line 80
> Set objControl1d = objPage2.Controls("QCApproval")
> Set objControl2d = objPage2.Controls("QCApprovalStore")
> Set objControl3d = objPage2.Controls("QCApprovalDate")
>
> 'Line 85
> if objControl1d <> objControl2d Then
> objControl3d.Value = Now()
> objControl2d.Value = objControl1d.Value
> end If
> 'Line 90
> Set objControl1e = objPage2.Controls("OrderSizeApproval")
> Set objControl2e = objPage2.Controls("OrderSizeApprovalStore")
> Set objControl3e = objPage2.Controls("OrderSizeApprovalDate")
>
> 'Line 95
> if objControl1e <> objControl2e Then
> objControl3e.Value = Now()
> objControl2e.Value = objControl1e.Value
> end If
> End Sub
> 


0
Chaney34 (30)
3/12/2005 12:41:05 AM
Reply:

Similar Artilces:

"Error code 0x80004005" Event ID: 9662
Recently this error has occurred on the exchange server. There also another event ID: 9661 about IMF raised to 5. There is Groupshield and virus scan 8i on this server. I did not find any articles on this error. Can you direct me to a correct article. Thank you, Koz Sounds like your DC/GCs are not responding. See http://support.microsoft.com/?kbid=310896 and http://support.microsoft.com/?kbid=318067 Jeff Guillet, MCSE "koz" wrote: > Recently this error has occurred on the exchange server. There also another > event ID: 9661 about IMF raised to 5. > >...

PSTPRX32.DLL Error Message
Greetings: I received an email message the other day that had a virus on it. I am using Norton Antivirus 2003. It removed the virus from the email. However, if I try to delete the email, forward the email, open the email, or reply to the email, I get the following error message from Outlook: "Outlook has caused an error in PSTPRX32.DLL. Outlook will now close." I would appreciate any feedback in regards on how to permantently delete this email message and how to fix the error. Regards, David Baker Have you tried turning off the Preview Pane then deleting the mail ite...

#ERROR in Custom Field
I wrote a simple equation Additional Costs = ([Cost]) * 0.08 It was accepted into the equation but in the column it show "#ERROR" Does anyone have any suggestions or know what I did wrong? Hit the F9 key to recalculate. What type of field is the Additional Costs field? -Jack Dahlgren "Erin" <Erin@discussions.microsoft.com> wrote in message news:EE0A8BFF-7179-4168-80EC-DE1881F8E284@microsoft.com... > I wrote a simple equation > > Additional Costs = ([Cost]) * 0.08 > > It was accepted into the equation but in the column it show...

OLE Error
I design an OLE server, and in the excel spreadsheet, I have macro that create OLE object and and OLE object will updatie the data in spreadsheet. it works fine under Excel 97/2000 for long time, but now under Excel 2002/2003, sometimes I got "OLE error 800AC472". the problem happens when it took OLE server too long to update the data in spreadsheet, if it take less than one minute to update spreatsheet, everything is fine, but when it takes more than 2 minutes, it raises exception. it looks like EXCEL disconnects from the OLE server. but again, it works fine under Excel 2000. plea...

Free / Busy Replication Error
We keep getting the error below in our Application Event Log. It has been happening since I made our Exchange 2003 Server native (previously there was an Exchange 5.5 server it was replicating with). All public folders are located on the new Exchange Server (MAIL01) and there are no other replication partners in the list. When making the Exchange setup native, I followed the steps recommended by Microsoft so think that all is in order as regards this. Any ideas / help would really be apprecaited! Event Type: Error Event Source: MSExchangeFBPublish Event Category: General Event ID:...

SQL Trusted Data Source Error
I was wondering if anyone has experienced this problem. After sucessfully installing GP, I launched GP and when the log in screen comes up it asks for a UserID and password (SQL Server). I enter the user SA and password then I get the following error” You’re attempting to log in from a data source using a trusted connection. Update the SQL Server settting for this data source to disable trusted connections and try logging in again." How do you disable this trusted connection? Or fix this so I can start GP? Any help would be appreciated. Thanks. Open the control panel, go to ad...

Fire content code from master page
Is it possible to have a Menu item that is in a master page fire code that resides in the content page code-behind? For example, I have an aspx page and a aspx.vb page and would like to run code in the aspx.vb page from the master page when clicking on a MenuItem in a menu control. Thanks. -- David On Feb 8, 5:28=A0pm, DavidC <dlch...@lifetimeinc.com> wrote: > Is it possible to have a Menu item that is in a master page fire code tha= t > resides in the content page code-behind? =A0For example, I have an aspx p= age > and a aspx.vb page and would like to run cod...

Searching Help gives error
Hello, I can open the Help contents from the Menu bar or the blue question mark but when I type in a search term I get "Server error in '/' Application", "service is not running". Seems like I know this but am stumped. Thank you for your help, Mark Hi Mark, Can you see if the "Indexing Service" is running on the server? Thanks! Manoj "Markw911" <Markw911@discussions.microsoft.com> wrote in message news:A4BFCB92-4841-4F4F-AF5A-7AAAF4F0892E@microsoft.com... > Hello, > I can open the Help contents from the Menu bar or the blue ...

Case resolution errors
I am experiencing issues with remaining time on contracts not adding up correctly. The errors are being caused by how the time is rounded when resolving a case. As an example, if you resolve a case and enter 25 hours for the duration CRM will change the display to 1.04 days. The data is acually stored as 1498 minutes but it should be 1500 minutes. If I enter 25 hours the system should store the proper amount of minutes. I have reported this to Microsoft and they are considering a hotfix. Has anyone else seen this behaviour? If you use contracts with time allotments you are probably b...

Money error and then crashes
Hi This problem has just started today. In the Account List, there are 2 accounts highlighted in Red. If I click on one of them, then 'go back', nothing happens but if I click on the other, the Money crashes with the following error: "Microsoft Money Error Reporting has encountered a problem and needs to close. We are sorry for the inconvenience." I tried a quick repair but it didnt fix this. Please can you help me? Thanks in advance. "abc" <noreply@mail.com> wrote in message news:ODfQ4fVVKHA.2932@TK2MSFTNGP04.phx.gbl... > Hi > > This ...

CRM 3.0 Error 01-10-06
We upgraded CRM 1.2 to 3.0 a couple weeks back. Ever since we periodically see the following error pop up while inside of the Outlook Client: "There is a problem communicating with the Microsoft CRM Server. The server might be unavaiable. Try again later. if the problem persists, contact your system administrator." Also, when attempting to complete/cancel tasks in CRM, we receive the following error: "An error has occurred. For more information, contact your system administrator." The strange part here is, we receive this error, yet when we click Cancel on the...

Validate zip codes
Hello! I am trying to find a good formula that will validate zip codes, but isnumber(), len(), etc. are not working for me. Here are my testers: 00501 12h78 h1234 1234h 12345 It needs to allow only digits, including possible leading zeroes like the first example. It can't allow letters in any of the positions. If there is already a formula that validates 5 and 9 digit zip codes, that would be ideal, so that the user could put the zip in as "xxxxx" or "xxxxx-xxxx". Oh, and it can't be VBA. I appreciate the help! VR/ Lost This isn't very pretty but it s...

Error: "Unable to send the message ... 0x800CCC78"
No info in MS KnowledgeBase about this error message summarized in Subject Line in MS Outlook 2003 I am getting when trying to send an outbound e-mail message. Comcast.net does not know why I keep getting. I can receive inbound e-mail just fine. All e-mail account settings verified and re-verified. Any ideas? Thanks. John Hoffmann Does the outgoing SMTP server require authentication? If so you need to check the box in tools - email accounts - change/view - more settings - outgoing server Suzanne, Good idea but, unfortunately, we've tried that as well. JHH >-----Origina...

Keep getting HDD error 128,""
I keep getting a HDD error sporatically when I shut my computer off. I use BartPE (WinXPsp2) CD and run CHKDSK c: /f to correct the error and below is the output from that. I don'g lose anything but it is annoyning as it shows up as a BSOD on boot up, and I have to power down and power up again to get it into Windows. Once it boots up, it is fine. This is not just a hardware issue as I have two identical HDs that I swap out (use TI to image the drive) and it happens on both. I have even rebuilt the HDD from scratch (what a PITA) but it still happens. Anyone have any idea...

Save As error 918
I am getting error 918 when trying to save a Visio (2000) organisational flow chart as an Adobe illustrator file type (*.ai). The messgae reads 'An error (918) occurred during action Save As. The filter is unable to recognize the file.' Does any one have any ideas how tio overcome this? ...

worksheet code
Hi, Is it possible to add one more cell in the below work sheet code ("$A$10"). Private Sub Worksheet_Change(ByVal Target As Range) Dim iPos As Long On Error GoTo ws_exit: Application.EnableEvents = False With Target If .Address = "$B$8" Then If Len(.Value) > 50 Then iPos = InStrRev(.Value, " ", 51) If iPos > 0 Then Offset(1, 0).Value = Right(.Value, Len(.Value) - iPos) Value = Left(.Value, iPos) End If End If End If End With ws_exit: Application.EnableEvents = True End Sub thanks and regards nowfal -- nowfal --------------------------------------...

Resource sharing error
MS Project 2007 question / assistance needed - I created a separate project file for shared resources, filled in names of resources (techs), hourly rates, etc., etc, then saved the file as (named) "resources". When I try to share those resources in my current project, (tools>resource sharing>Share resources) and select the "resources from" the resources file, each resource then shows up in BOTH project’s resource files. Now all resources are showing up in both projects? Delete unwanted rows from one project, and they're deleted in BOTH projects. What...

Error OFXIE 12029 when connecting to Schwab since ~7/5 on Money 2004
I've been getting "An Internet communication error occurred. Please try your call again later. (OFXIE 12029)" whenever I try to download from Schwab. I can get quotes just fine, though, I have: -Confirmed my firewall is allowing 100% access to Money 2004 -Checked the MSFT site; they acknowleged the problem on the network status site (http://moneycentral.msn.com/common/networkstatus.asp) until today; now nothing. Also the Knowledge Base article that discusses this error and has a troubleshooting guide is now gone. -Uninstalled the accounts on Money...now I'm trying to re...

trying to unravel an encrypted string that was encrypted in dotnet managed code.
I posted this yesterday in the security.crypto newsgroup but thought this might be more appropriate. if I were using WinCrypt.h, etc. how would the following have to change for the decryption portion. I will be encrypting in managed code and need to decrypt in a service component that is unmanaged C++. thank you. -Greg arguments passed into this would be an encrypted xml string and two byte arrays, one the key and one the inititialization vector. using System.Security.Cryptography; using System.IO; RC2CryptoServiceProvider rc2 = new RC2CryptoServiceProvider(); rc2.IV = iniitialization_ve...

Outlook Coding
I have code to send emails progamtically from a module in Excel 2000 using OUtlook 2000, but now I need to have the code select 1 of 5 different email addresses and potentially a different mail server. Any ideas? --------------------------------- Set NewMail = CreateObject("Outlook.Application") Set objmail = NewMail.CreateItem(olMailItem) With objmail .To = Email .Subject = "Quotes for " & Name .Body = emailtext .Send End With Set NewMail = Nothing Set objmail = Nothing ---------------------------------- Submitted...

excel 2000 Program error
When try to work on excel sheet I get this error "EXCEL.exe has generated errors and will be closed by windows. you will need to restrat the program. An error log is being created" Thx Seenu ...

Installation Error: CRM Sales for Outlook 1.2
I have been trying to install CRM Sales for Outlook v 1.2 on my computer with Window 2003 Server. I get the following error message. CRM Sales for Outlook already been installed on this computer The following points may be relevant: - I have tried to install it in the past and it has failed at some point during the process. - I have been able to install CRM Server 1.2 - I am the only user on this computer (Administrator). I cannot uninstall the program because it does not appear in the list of programs. I have no idea what to do. I appreciate any help in this regard. Thanks Chris I hav...

CRM installation fails - 500 internal error
Hi there! All my past crm installations failed and I had no clue why. I guess most of you would have known what the problem was because there were no postings in the newsgroups regarding my installation problems. When opening the mscrm browser for the first time it respondes with an 500 internal error. For all those who are about to experience the same problems, here is the solution. In my configuration I had crm 1.0, sql 2k and exchange 2k on one machine. Since I have 1.5 GB RAM, I had to set the 3GB parameter in the boot.ini, according to the implementation guide. BUT asp.net doesn...

WLM Windows 7
I have just started using WLM and Calender in Windows 7. However, it keep getting the following message " "Something unexpected has happened and Windows Live mMail has had to close down". My imported contacts also disappeared (now reimported) and it seems to happen when I have Calender open (but I'm not sure that it always happens when it is open). I have looked for fixes and tried the following: On AVG I removed the email scanning option. (Failed to work) I have uninstalled AVG and replaced it with Microsoft Security Essentials (Failed to work) In tools...

3075 Error Trying to search for key word in a comments field.
OK so here is where I am and what I am trying to do next. Where I am. I have my Visual Basic code tied into the OK command button. I have a Form to search through my data and only put the requested information in a query. So far I have all of this working fine. I have the code clear the query each time it is used and repopulate the querry with the new choices.(The Where From etc...) The Problem with what I am trying to do next. It has been decided that there needs to be a comments column. They then what the option to search for a key word in the column to define the results. The...