![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Does anyone know why this code is working in Outlook 2003 but not in Outlook
2002 SP3. Sub Commandbutton18_Click Set ExcelSheet = CreateObject("Excel.Application") Set Sheet = ExcelSheet.Workbooks.Add("t:\Shared\Purchase Outlook Forms\POletter.xls") ExcelSheet.DisplayAlerts = False ExcelSheet.visible = True ExcelSheet.Cells(4,2) = NOW() ExcelSheet.ActiveSheet.Protect End sub The error message only says, "Operation Failed." ExcelSheet.Cells(5,2) = Item.UserProperties.find("Order Number").Value ExcelSheet.Cells(7,2) = Item.UserProperties.find("(1) Requested by").Value ExcelSheet.Cells(17,2) = Item.UserProperties.find("Ship to").Value -- Gloriann O'Brien |
Ads |
#2
|
|||
|
|||
![]()
Which statement raises the error?
-- 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 "gobjob" wrote in message ... Does anyone know why this code is working in Outlook 2003 but not in Outlook 2002 SP3. Sub Commandbutton18_Click Set ExcelSheet = CreateObject("Excel.Application") Set Sheet = ExcelSheet.Workbooks.Add("t:\Shared\Purchase Outlook Forms\POletter.xls") ExcelSheet.DisplayAlerts = False ExcelSheet.visible = True ExcelSheet.Cells(4,2) = NOW() ExcelSheet.ActiveSheet.Protect End sub The error message only says, "Operation Failed." ExcelSheet.Cells(5,2) = Item.UserProperties.find("Order Number").Value ExcelSheet.Cells(7,2) = Item.UserProperties.find("(1) Requested by").Value ExcelSheet.Cells(17,2) = Item.UserProperties.find("Ship to").Value -- Gloriann O'Brien |
#3
|
|||
|
|||
![]()
I'm not sure. I have 2003 sp1. Someone in another office has 2002 sp3 and
this is not setup with the debug. I'm trying to avoid a trip to Atlanta to see what is happening since I have no one in this office with 2002. I know there were times I had to make code changes with different packs for example when UserProperties.Find(fieldname) wasn't working with the .Find. I just don't recall this code needing to be changed. He is able to access the automatic sequencing numbers that are in access on the same drive. So the drive is not the issue. I don't know how it can be the data that I'm writing to excel because it is working for everyone else. So it leads me to believe it is in the first few statements. Thanks. -- Gloriann O'Brien "Sue Mosher [MVP-Outlook]" wrote: Which statement raises the error? -- 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 "gobjob" wrote in message ... Does anyone know why this code is working in Outlook 2003 but not in Outlook 2002 SP3. Sub Commandbutton18_Click Set ExcelSheet = CreateObject("Excel.Application") Set Sheet = ExcelSheet.Workbooks.Add("t:\Shared\Purchase Outlook Forms\POletter.xls") ExcelSheet.DisplayAlerts = False ExcelSheet.visible = True ExcelSheet.Cells(4,2) = NOW() ExcelSheet.Cells(5,2) = Item.UserProperties.find("Order Number").Value ExcelSheet.Cells(7,2) = Item.UserProperties.find("(1) Requested by").Value ExcelSheet.Cells(17,2) = Item.UserProperties.find("Ship to").Value ExcelSheet.ActiveSheet.Protect End sub The error message only says, "Operation Failed." -- Gloriann O'Brien |
#4
|
|||
|
|||
![]()
I would definitely not use UserProperties.Find, since there are known problems with it in at least one Outlook version.
"Operation failed" errors can be very difficult to track down. It might be cheaper to buy a copy of Office XP or Outlook 2002 on eBay than to take a trip to Atlanta. If it's just one user and others with the same version have no problems, then I'd have that user run Help | Detect and Repair. -- 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 "gobjob" wrote in message ... I'm not sure. I have 2003 sp1. Someone in another office has 2002 sp3 and this is not setup with the debug. I'm trying to avoid a trip to Atlanta to see what is happening since I have no one in this office with 2002. I know there were times I had to make code changes with different packs for example when UserProperties.Find(fieldname) wasn't working with the .Find. I just don't recall this code needing to be changed. He is able to access the automatic sequencing numbers that are in access on the same drive. So the drive is not the issue. I don't know how it can be the data that I'm writing to excel because it is working for everyone else. So it leads me to believe it is in the first few statements. Thanks. -- Gloriann O'Brien "Sue Mosher [MVP-Outlook]" wrote: Which statement raises the error? "gobjob" wrote in message ... Does anyone know why this code is working in Outlook 2003 but not in Outlook 2002 SP3. Sub Commandbutton18_Click Set ExcelSheet = CreateObject("Excel.Application") Set Sheet = ExcelSheet.Workbooks.Add("t:\Shared\Purchase Outlook Forms\POletter.xls") ExcelSheet.DisplayAlerts = False ExcelSheet.visible = True ExcelSheet.Cells(4,2) = NOW() ExcelSheet.Cells(5,2) = Item.UserProperties.find("Order Number").Value ExcelSheet.Cells(7,2) = Item.UserProperties.find("(1) Requested by").Value ExcelSheet.Cells(17,2) = Item.UserProperties.find("Ship to").Value ExcelSheet.ActiveSheet.Protect End sub The error message only says, "Operation Failed." -- Gloriann O'Brien |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Auto Suggest Stoped working in Outlook 2003 | [email protected] | Outlook - Using Contacts | 3 | February 3rd 06 08:53 PM |
Hotfix OUTLOOKff interfering with working code. | [email protected] | Add-ins for Outlook | 2 | January 23rd 06 11:49 PM |
code : Code : 800cccd2 | scotty971fr | Outlook Express | 1 | January 19th 06 11:59 PM |
Direct Booking not working for Outlook 2002 clients | RussK | Outlook - Calandaring | 1 | January 19th 06 03:27 PM |
Reminders stopped working in Outlook 2003--Is there a way to reset? | resonator80 | Outlook - General Queries | 5 | January 11th 06 03:00 PM |