ole

How to iterate Outlook Inbox by Date? - Outlook OLE Automation

I'd like to iterate Outlook Inbox and I'm with Ruby. I've found some useful info here, but the order of message in Inbox is not ordered by RecevedTime(Property for Item OLE object). GetLast method may find the latest message but GetPrevious method does not work as I expected. require 'win32ole' outlook = WIN32OLE.new('Outlook.Applicat...

Word OLE Automation - delete first page and manipulate header and footer

Hi, I am using PHP to start Word Automation and manipulate word documents, but i guess it can be done in all any other language. What i need to do is quite simple, i need to remove the first page and add header and footer. Here is my code: $word = new COM('word.applicantion'); $word->Documents->Open('xxx.docx'); $word->Documents[1]...

Add File Summary tab data in runtime in NTFS in WinXP SP3

Hello, stackoverflowers :) I have given up tryng to figure out the reason of this issue, but here is the story and hope you could give a tip... As I develop unique app ( http://code.google.com/p/sedev ) and therefore I need to polish it. I have to add File Summary ( very useful info in my opinion ) to any created files by the app, so I...

Drag and drop from Outlook attachment to VB6 application

I am experimenting with drag and drop from an outlook email attachment to a custom application. It works just fine with C#, but now I'd like to get it working in VB6. My test code looks something like this: Private Sub grdLis_OLEDragDrop(Data As MSFlexGridLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, ...

Delphi, olevariants and arrays of strings

i have an ole Object created with (simple verion) obj := CreateOleObject('foo.bar'); obj.OnResult := DoOnResult; procedure TMyDM.DoOnResult(Res: olevariant); which all works, the res variable has a function String[] GetAns() which im calling like this var ans: array of string; begin ans := Res.GetAns; end; which again works.. ex...

"CDO.Message" is not working in my Delphi application

Hi! I created an application uses CreateOLEObject("CDO.Message") Everything is working fine in my machine, but in another I got Érvénytelen osztályú karakterlánc. errormessage (hungarian). This is meaning these error codes by ms support (http://support.microsoft.com/kb/186063/hu): -2147221005 (800401F3) The destination machi...

InvalidCastException, QueryInterface call failing on COM component

First off, I'm extremely new to the whole COM scene so bare with me. I'm trying to use PCAnywhere's Ole automation in a .net applicaction I'm currently developing (VS 2010, c#). PCA 12.5 comes with a couple tlb files that when I try to add as references through VS I get an error on both saying 'A reference to 'E:\Dev\PcaOle\awrem32.tlb'...

How to find interfaces of an ActiveX control?

Given an instance of an ActiveX control, how do I enumerate it's interfaces? (I'd like to get the names of the interfaces). ...

Calling an old OLE component from C#

I have a very old (VC++ 5.0) proprietary DLL which I need to use from C# (Visual Studio 2010). The example specifies that to access this component I need to call CreateDispatch("application") which indicates towards OLE. The following is the example code (C++): IComponentServer Server; Server.CreateDispatch("Component.Server"); I a...

Is it possible to have Delphi auto-generate event-support code for an imported OLE/COM type library?

I'm trying to generate _TLB import units for Outlook 2003, 2007 and 2010 (and also other OLE servers) analogous to the ones bundled with Delphi for Outlook 2000 and 2002. However, I couldn't get the type library importer to also generate the code for capturing events from the OLE servers that is found in the bundled units. The option to ...

Using OLE to get text out of Powerpoint

I am trying to use Win32::OLE to get a list of slides and their titles from the current presentation. So far I can get my $powerpoint = Win32::OLE->GetActiveObject('Powerpoint.Application') my $ap = $$powerpoint { ActivePresentation } ; my $slides = $$ap { slides } ; But $slides only has properties Application Count Pare...

MS Word OLE - How to access ActiveDocument without raising an exception?

Hi, In Word automation through OLE, when accessing the ActiveDocument property an exception will be raised if currently no visible document is available (at least in Delphi), so, my goal is to do some test like IsActiveDocumentValid, how to do that without raising an exception? Thank you! ...

List of all OLE error codes

Is there a list of all OLE error codes? ...

DragDropEffects.Scroll: why -2147483648 not 8?

A standard enumeration in System.Windows.Forms: [Flags] public enum DragDropEffects { Scroll = -2147483648, // // Summary: // The combination of the System.Windows.DragDropEffects.Copy, System.Windows.Forms.DragDropEffects.Link, // System.Windows.Forms.DragDropEffects.Move, and System.Windows.Forms.DragDropEf...

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

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

OLE Excel, unable to read last row. Little/big endian issue?

Hello, I'm trying to read an Excel file using OLE. The issue is that when the Excel file is located in a Unix share, when I try to read from it, I'm not able to read last row (only the last). However, if I copy the file to Windows beforehand, then it is OK. I think it might be some issue related to big/little endian. Any help would ...

Splitting word file into multiple smaller word files using OLE Automation from java

Hi there, I have been using OLE automation from java to access methods for word. I managed to do the following using the OLE automation: Open word document template file. Mail merge the word document template with a csv datasource file. Save mail merged file to a new word document file. What i need to do now is to be able to open the...

How to make WPF App as OLE object which can embedded in MS Excel ?

I want to make my WPF app as an OLE object which can be inserted and launched from an MS-Excel . When I open an Excel-2003 and go to Insert->Object a list of OLE object are shown in Create New tab. I want to register my WPF app as an OLE object so that it is also shown in the list. User can able to insert and launch the appliction from ...

What are the good wysiwyg HTML editor controls based on ActiveX?

What are the good wysiwyg HTML editor controls based on ActiveX? There are two editors I have found so far, both are good but also have some shortcomings. I am looking for a better alternative. nBit HTML ActiveX Control XStandard Pro XHTML WYSIWYG Editor Javascript based HTML editors are not relevant in my context. I want to add th...

How to use DotNet EXE as OLE object

Hi, I would like to insert my DotNet EXE application in excel sheet just like an OLE object. Is it possible? If yes, how we can do this. In Excel 2003 when we click Insert->Object menu item, we get the 'Object' diloag. The 'Create New' tab of this dilaog contains varios OLE objects. I would like to display my DotNet exe application in ...