G
Guest
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
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