ole

How to extract metafile from TOleContainer?

做~自己de王妃 提交于 2019-11-30 17:41:28
问题 I have a Delphi (BDS 2006) application with TOleContainer control. It has an OLE object inside, MS Equation formula (name 'Equation.3') from MS Office 2003. How can I extract the vector metafile from the formula image to insert it into web-page or some other document without OLE support? TOleContainer has only 'Equation.3' objects inside, no other possibilities. I've tried to use .Copy method to make it through clipboard, but it's copied an empty image. 回答1: OLE Container has on underlying

Crystal Reports Changing the Data Source

自古美人都是妖i 提交于 2019-11-30 17:33:54
I have a Crystal report where the data source has originally been set to use ODBC connections. Now I want to modify the data source to instead use OLE DB instead of using ODBC. How do I replace the data source connection without breaking the database fields which I have originally set up for my report? If I try to delete the original data source, the fields which I have already set up are also deleted. Is there a way to map the report to use OLE DB instead of the ODBC connection? Thanks. Its easy. Right click on the database fields in your field explorer. Click on 'Set datasource location' And

Ole 800A03EC error when using TExcelWorkBook SaveAs method in Delphi 7

爷,独闯天下 提交于 2019-11-30 14:52:43
I am trying to open excel 2003 workbook and save it as something else, for example excel 95. I use the following code: XLSApp:=TExcelApplication.Create(Self); XLSApp.Workbooks.Open(SomeFileName,NULL,false,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,defaultlcid); XLSWB:=TExcelWorkbook.Create(XLSApp); XLSWB.ConnectTo(XLSApp.Workbooks.Item[1]); XLSWB.SaveCopyAs(ExtractFilePath(edTable.Text)+'temp.xls'); XLSWB.SaveAs(SomeOtherFileName,xlExcel7,EmptyParam,EmptyParam,False,False,xlNoChange,xlUserResolution,False,EmptyParam,EmptyParam,EmptyParam,DefaultLCID); Unfortunately this code

Excel VBA create an embedded WebBrowser and use it

China☆狼群 提交于 2019-11-30 14:24:32
Hi I'm trying to dynamically create a web browser inside a spreadsheet and then use it but the WebBrowser functions don’t seem to work Here is how I create the WebBrowser Set myWebBrowser = Sheets("test").OLEObjects.Add(ClassType:="Shell.Explorer.2", Link:=False, DisplayAsIcon:=False, left:=147, top:=60.75, width:=141, height:=96) This will work myWebBrowser.top = 10 But this will give me an error myWebBrowser.Navigate ("about:blank") Any ideas on what should I do thank you UPDATE: This will also don't work and give an error: myWebBrowser.Object.Document.body.Scroll = "no" myWebBrowser.Object

OLE Container for .NET

无人久伴 提交于 2019-11-30 09:20:40
问题 I'm working on a project that requires me to load an OLE object and render it in a .NET WinForm app (C#). Unlike VB6 .NET has no built in OLE container, and the recommended approach is to use the WebBrowser control which supports displaying ActiveX content. The issue I have is the provider of the OLE object in question does not have an ActiveX control available. Simply put is there any way to load an OLE object onto a WinForm? Or will I need to write an ActiveX control that loads the OLE

COM surrogate for third party component

徘徊边缘 提交于 2019-11-30 07:07:11
I'm writing a small DLL component that needs to access two third party components to combine data, one of which is 32 bit only and the other is 64 bit only. Both are registered with a TypeLib and are Automation compatible, so marshalling should not be an issue. If I understood the documentation correctly, then there is no way to force loading in a surrogate unless the component also has an AppID and the DllSurrogate key; since both are third party components, I'm somewhat reluctant to modify their registration. Is there a way to activate an object in a component without an AppID in a surrogate

Ole 800A03EC error when using TExcelWorkBook SaveAs method in Delphi 7

倖福魔咒の 提交于 2019-11-29 21:41:59
问题 I am trying to open excel 2003 workbook and save it as something else, for example excel 95. I use the following code: XLSApp:=TExcelApplication.Create(Self); XLSApp.Workbooks.Open(SomeFileName,NULL,false,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,defaultlcid); XLSWB:=TExcelWorkbook.Create(XLSApp); XLSWB.ConnectTo(XLSApp.Workbooks.Item[1]); XLSWB.SaveCopyAs(ExtractFilePath(edTable.Text)+'temp.xls'); XLSWB.SaveAs(SomeOtherFileName,xlExcel7,EmptyParam,EmptyParam,False,False

Save as an Excel file embedded in another Excel file

家住魔仙堡 提交于 2019-11-29 16:21:38
I want to manage with VBA an Excel file embedded in another Excel file. I can find many results with .docx documents, but I stuck with a .xlsx one. My last try is using OLE objects, but stuck at the line "SaveAs" (Error 1004). Here is the weird part: when I start debugging, or if I run the program step by step using F8, it did run, but no file were saved... I called my OLEObject "TEST" for this example: Sub testOLE() mPath = ActiveWorkbook.Path For Each obj In Worksheets(1).OLEObjects If obj.Name = "TEST" Then obj.Verb obj.Object.Activate obj.Object.SaveAs mPath & "TEST_success.xlsx" obj

OLE Container for .NET

我与影子孤独终老i 提交于 2019-11-29 14:46:06
I'm working on a project that requires me to load an OLE object and render it in a .NET WinForm app (C#). Unlike VB6 .NET has no built in OLE container, and the recommended approach is to use the WebBrowser control which supports displaying ActiveX content. The issue I have is the provider of the OLE object in question does not have an ActiveX control available. Simply put is there any way to load an OLE object onto a WinForm? Or will I need to write an ActiveX control that loads the OLE Object? If the latter, does anyone have an example of this, or recommended reading material? cheers, Marc.

Why is this C# COM class usable from VBScript but not JScript?

 ̄綄美尐妖づ 提交于 2019-11-29 13:57:12
Consider the automation-compatible COM library in C#, given below. It follows a common COM pattern of having a visible factory coclass FooFactory implementing ICreateFoos which creates an object of type IFoo. FooFactory is the only coclass in the type library. (The factory pattern is particularly useful with COM, as it does not allow for parameterized constructors). In the code below, I'm finding that I cannot access the returned IFoo interface from jscript unless I make the FooImpl class ComVisible (by uncommenting commented lines; this causes it to appear as a coclass in the type library).