ole

Converting an OLE Image Object from MS Access for use in .NET

Hello, I'm working on redeveloping an Access based system into c#.net, however when MS went from office 2003 to office 2007 they removed the picture editor within access - which meant that previously stored pictures would no longer display in the system. The guys at the company did a hack that basically saved the images with VBA using e...

Piloting Microsoft Word With Ole in C++ Builder : how to put Word in the foreground.

Hi! I've got a code (which works fine) for piloting word with C++ Builder. It's useful for reaching different bookmarks in the document. Variant vNom, vWDocuments, vWDocument, vMSWord, vSignets, vSignet; vNom = WideString("blabla.doc"); try { vMSWord = Variant::GetActiveObject("Word.Application"); } catch(.....

Convert RGB Colour to OLE_Color

I have the unenviable task of maintaining an ActiveX control that expects OLE_Colors as the back/for colour of the control. Is there a tool or a .NET code sample that will convert from an RGB colour (or a hex colour) to an OLE_Color? ...

Interface Marshalling in Delphi

I want to send Interface Ref of IVApplication from Visio Add-in to my other one COM server. But I have Ole exception. Now i do that: Code in Visio Add-in: var IStrm: IStream; hres: HResult; rhglobal: HGLOBAL; VisioAppl: IVApplication; begin hres := CreateStreamOnHGlobal(0, TRUE, IStrm); if Succeeded(hres) then ...

How can I change the colourindex of a word in a string for msword using Win32:OLE?

I am actually trying to change the color index for the first word with braces in an array so they show up in the right color in Word 2003. For example, if I have an array like this: @array=" (This) is (perl), perl is a great (language), we can do anything with perl, (perl) feels us great." I need th...

Ole atomation in c#

I write vbs that create ole atomation object On Error Resume Next dim objShell dim objFolder if not objFolder is nothing then objFolder.CopyHere "ftp://anonymous:[email protected]/bussys" WScript.Sleep 100 end if set objShell = nothing set objFolder = nothing How to do that on C# (or do that without ole automation just use ...

The application called an interface that was marshalled for a different thread

i'm writing a delphi app that communicates with excel. one thing i noticed is that if i call the Save method on the Excel workbook object, it can appear to hang because excel has a dialog box open for the user. i'm using the late binding. i'd like for my app to be able to notice when Save takes several seconds and then take some kind ...

Releasing an OLE IStorage file handle in C#

I'm trying to embed a PDF file into a Word document using the OLE technique described here: http://blogs.msdn.com/brian_jones/archive/2009/07/21/embedding-any-file-type-like-pdf-in-an-open-xml-file.aspx I've tried to implement the C++ code provided in C# so that the whole project's in one place and am almost there except for one roadblo...

Can a program that controls IE detect if a HTTP 30x code is encountered?

I am trying to control an InternetExplorer.Application via the COM interface, using Perl, Win32::OLE, and information from MSDN. My goal is to get as good an idea as possible about what IE is doing. (Related to this question.) IE uses events to notify my program when it has finished various stages of processing a certain URL (NavigateCo...

Unable to use Excel's Run() command

I have a C++ application that communicates with Excel via OLE. One of the things it can do is to send Excel 4-style macros to Excel. This macro language is old, but still works for me. Unfortunately, I have a user who is having trouble with some of the macros being sent. When I send the macro SAVE.AS("myfile.xls") it executes correctly. ...

How to translate legacy (OLE) colors to (A)RGB with .NET?

I have a list of color values encoded as signed integers (OLE I think) in a legacy INI file that I need to translate into (A)RGB values with .NET. An INI example: [INI_Section] Color=-2147483633 Doing something like: Color.FromArgb(-2147483633) gives an alpha-blended version of a color that is not at all what I expect. I think t...

VBs and multilevel OLE?

So here is my problem, I have made a vbscript to target some computers and do wmi queries on them, and my boss wants this data to be put inside a document. The problem is that this document is a .doc document with embedded excel objects inside it. Now I have searched wide and far on google on any way to target and manipulate an object in...

Problems with native Win32api RichEdit control and its IRichEditOle interface

Hi All! As part of writing custom command (COM-Visible dll with class that implements Interwoven command interface) for one of Interwoven Worksite dialog boxes,I need to extract information from RichEdit textbox. The only connection to the existing dialog box is its HWND handle; Seemingly trivial task , but I got stuck : Using standa...

Crystal Reports Changing the Data Source

Hi. 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 orig...

OLE Automation: IDispatch implementing class; client or Server?

I have a project which I'm studying the codebase of, however I'm trying to understand how this whole OLE Automation works. In the OLE Automation protocol, which application has to implement IDispatch on one of its classes, the server or the client? ...

Access 2007 - ole field linked to a jpg file via a field that contains the path

I need help understanding how to link a ole object in a form to retrieve it's object via a field with the path value. Example: strOriginalFullPath contains the path for that record. I would like to link the ole object via the value of that field in that record. ...

How to extract metafile from TOleContainer?

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 ins...

Strip OLE header information (MS Access / SQL Server)

I have a C++ application that needs to support binary database content (images, etc). When using MS Access or MS SQL Server this data is wrapped inside an OLE object. How do I strip this OLE header information? Note that I can't just look for the beginning of a specific tag as the content can be png, jpg and a whole heap of other formats...

How to catch a moment when the external editor of TOLEContainer has been closed?

Borland Developer Studio 2006, Delphi: I have a TOLEContainer object with AllowInPlace=False. When the external editor is closed and changed my OLE object I have to do something with this OLE object inside TOLeContainer. The problem is I can't catch a moment when the external editor is closed. OnDeactivate event is not working. Prob...

Is there any library to access OLE Structured Storage from C#?

Can I find some open source library for accessing (reading only is ok) OLE Storage like doc or xls files in c#? ...