Error Occurred While Accessing Component Property/method Saveas
Contents |
'Development' started by stokefc22, Jul 19, 2011. stokefc22 Member Morning All, This is my first post so please go gently with error occurred while accessing component property/method printout me :blush1:. We’re using open edge version 10.2b and I have unable to set com-handle property 5677 a machine running vista. The problem I have is as follows: - I’m running a report via a
Error Code 0x80020009
background process that we developed in house. This report generates a load of data outputs it to excel, saves the file and then attaches to email and sends the email to the required people. Using Excel 2007 this works fine but the minute I try on it a machine using excel 2010 I have problems saving the file. I’m using the following line of code in an attempt to save the file where chrPathFile = “..\tmp\afile.xlsx”. chWorkbook:SaveAs(chrPathFile,,,,,,). I’ve read about the need to specify the file format in excel versions 2007 and above so have tried a combination of the following with no joy.... chWorkbook:SaveAs(chrPathFile,51,,,,,). chWorkbook:SaveAs(chrPathFile,56,,,,,). chWorkbook:SaveAs(chrPathFile,-4146,,,,,). I’ve also tried naming the file “..\tmp\aFile.xls” with no joy either. Please can somebody help me before I tear all of my hair out!! Thanks in Advance stokefc22, Jul 19, 2011 #1 Ads Master rzr ProgressTalk.com Sponsor I'm on 10.2A / Windows 7 Code (progress): DEFINE VARIABLE chExcelApp AS COM-HANDLE NO-UNDO. DEFINE VARIABLE chWorkBook AS COM-HANDLE NO-UNDO. DEFINE VARIABLE chWorkSheet AS COM-HANDLE NO-UNDO. DEFINE VARIABLE lAutoClose AS LOGICAL NO-UNDO INITIAL NO. CREATE "Excel.Application" chExcelApp. chWorkBook = chExcelApp:Workbooks:ADD(). chExcelApp:SheetsInNewWorkbook = 1. chExcelApp:sheets(1):Name = "FIRST". chExcelApp:Range("A1"):FONT:ColorIndex = 10. chExcelApp:Range("A1"):FormulaR1C1 = "2nd Data". chWorkBook:SaveAs("c:\temp\New.xlsx",,,,False,False,). IF NOT lAutoClose /* Open Excel for user access */ THEN ASSIGN chExcelApp:visible = true. /* Close Excel */ ELSE chExcelApp:QUIT(). /* Doesn't work! */ RELEASE OBJECT chWorkBook NO-ERROR. RELEASE OBJECT chExcelApp NO-ERROR. RELEASE OBJECT chWorkSheet NO-ERROR. rzr, Jul 19, 2011 #2 stokefc22 Member Cheers rzr, Is it excel 2010 you are using
sophisticated digital experiences Web content & Customer Journey Sitefinity CMS Build engaging websites with intuitive web content management Application Development, Testing & Deployment DevCraft Leverage a complete UI toolbox for web, mobile and desktop development OpenEdge Build, protect and deploy apps across any platform and mobile device Kendo UI Build rich, smart HTML5 and JavaScript apps for any platform, browser or device Telerik Platform Build mobile apps for iOS, Android and Windows Phone Nativescript http://www.progresstalk.com/threads/programmatically-saving-excel-2010-files.119789/ Use Angular, TypeScript or JavaScript to build truly native mobile apps Rollbase Rapidly develop, manage and deploy business apps, delivered as SaaS in the cloud Test Studio Automate UI, load and performance testing for web, desktop and mobile Modulus Host, deploy and scale Node.js, Java and .NET Core apps on premise http://knowledgebase.progress.com/articles/Article/000035961 or in the cloud Data Connectivity DataDirect Connectors Optimize data integration with high-performance connectivity Business Rules Management Corticon Automate decision processes with a no-code business rules engine View All Products Solutions Digital Business Transformation Transform your businesses in order to survive in a completely digitized and connected world driven by software innovation. Web Scale Globally scale websites with innovative content management and infrastructure approaches Modernization UX and app modernization to powerfully navigate todays digital landscape Omni-Channel Engagement Content-focused web and mobile solution for empowering marketers aPaaS Fuel agility with ever-ready applications, built in the cloud Enterprise Mobility Faster, tailored mobile experiences for any device and data source New & Trending E-book The Digital Ultimatum: Why Businesses Must Digitally Transform to Survive â€" and Thrive Survey Report The State of Digital Business Support & Learning Support Support Services Knowledge Base Customer Order Management Download Center Services Training Consulting Services Managed Database Off
sophisticated digital experiences Web content & Customer Journey Sitefinity CMS Build engaging websites with intuitive web content management Application Development, Testing & Deployment DevCraft Leverage a complete UI http://knowledgebase.progress.com/articles/Article/000037765 toolbox for web, mobile and desktop development OpenEdge Build, protect and https://support.office.com/en-us/article/GetObject-Function-b24e00a4-5f83-44c9-8cbf-cdc65faa2cf5 deploy apps across any platform and mobile device Kendo UI Build rich, smart HTML5 and JavaScript apps for any platform, browser or device Telerik Platform Build mobile apps for iOS, Android and Windows Phone Nativescript Use Angular, TypeScript or JavaScript to build truly error occurred native mobile apps Rollbase Rapidly develop, manage and deploy business apps, delivered as SaaS in the cloud Test Studio Automate UI, load and performance testing for web, desktop and mobile Modulus Host, deploy and scale Node.js, Java and .NET Core apps on premise or in the cloud Data Connectivity DataDirect Connectors Optimize data integration with error occurred while high-performance connectivity Business Rules Management Corticon Automate decision processes with a no-code business rules engine View All Products Solutions Digital Business Transformation Transform your businesses in order to survive in a completely digitized and connected world driven by software innovation. Web Scale Globally scale websites with innovative content management and infrastructure approaches Modernization UX and app modernization to powerfully navigate todays digital landscape Omni-Channel Engagement Content-focused web and mobile solution for empowering marketers aPaaS Fuel agility with ever-ready applications, built in the cloud Enterprise Mobility Faster, tailored mobile experiences for any device and data source New & Trending E-book The Digital Ultimatum: Why Businesses Must Digitally Transform to Survive â€" and Thrive Survey Report The State of Digital Business Support & Learning Support Support Services Knowledge Base Customer Order Management Download Center Services Training Consulting Services Managed Database Offering Learning Documentation Webinars How-To Videos Whitepapers Community Blogs Success Stories Partners Company Login Progress Support Rollbase DataDirect Cloud PartnerLink Telerik Your Account Telerik Platfo
To: Access 2016, Access 2013, Access 2010, Access 2007, Access 2010 Developer, Access 2007 Developer, Access 2013 Developer, Less Applies To: Access 2016 , Access 2013 , Access 2010 , Access 2007 , Access 2010 Developer , Access 2007 Developer , Access 2013 Developer , More... Which version do I have? More... Note: The function, method, object, or property described in this topic is disabled if the Microsoft Jet Expression Service is running in sandbox mode, which prevents the evaluation of potentially unsafe expressions. For more information on sandbox mode, search for "sandbox mode" in Help. Returns a reference to an object provided by an ActiveX component. Syntax GetObject([pathname ] [, class ] ) The GetObject function syntax has these arguments: Argument Description pathname Optional. Variant (String). The full path and name of the file containing the object to retrieve. If pathname is omitted, class is required. class Optional. Variant (String). A string representing the class of the object. The classargument uses the syntax appname.objecttype and has these parts: Part Description appname Required. Variant (String). The name of the application providing the object. objecttype Required. Variant (String). The type or class of object to create. Remarks Note: Examples that follow demonstrate the use of this function in a Visual Basic for Applications (VBA) module. For more information about working with VBA, select Developer Reference in the drop-down list next to Search and enter one or more terms in the search box. Use the GetObject function to access an ActiveX object from a file and assign the object to an object variable. Use the Set statement to assign the object returned by GetObject to the object variable. For example:
Dim CADObject As ObjectWhen this code is executed, the application associated with the specified pathname is started and the object in the specified file is activated. If pathname is a zero-length string (""), GetObject returns a new object instance of the specified type. If the pathname argument is
Set CADObject = GetObject("C:\CAD\SCHEMA.CAD")