ole

Getting list of hyperlinks from an Excel worksheet with Perl Win32::OLE

心不动则不痛 提交于 2019-12-11 17:44:46
问题 I want to change the path for a bunch of hyperlinks in an Excel spreadsheet. After searching Google, I came across a solutions to the problem of adding hyperlinks to spreadsheets, but not changing them. Microsoft showed how to something close with VBA here. Since I want to edit every single hyperlink in my document, the key steps that I don't know how to solve are: Get a list of hyperlink objects in Perl Extract their addresses 1 by 1 and Run a regular expression to make the path change Store

export HTML files with images to Excel single XLS file?

泪湿孤枕 提交于 2019-12-11 17:39:24
问题 I'm trying to export HTML file with pictures to Excel using C++ OLE Automation. Sample of code: #import "\\alpha\sdk\mso\office12\mso.dll" rename( "RGB", "MSORGB" ) rename("DocumentProperties", "MSODocumentProperties") rename("SearchPath", "MSOSearchPath") using namespace Office; #import "\\alpha\sdk\mso\office12\VBE6EXT.OLB" rename( "RGB", "MSORGB" ) rename("EOF", "EndOfFile") using namespace VBIDE; #import "\\alpha\sdk\mso\office12\excel.exe" rename( "DialogBox", "ExcelDialogBox" ) rename(

IDispatch returns DISP_E_UNKNOWNNAME for CommandBarButton.Style

痞子三分冷 提交于 2019-12-11 17:27:16
问题 I have a Visual Studio add-in, which contains a scripting engine implemented in C++. The add-in can only communicate with Visual Studio using IDispatch interfaces. I am in the process of upgrading it from VS 2005 to VS 2010. The add-in makes a series of IDispatch::Invoke() calls equivalent to this Visual Basic: control = commandBar.Controls.Add(MsoControlType.msoControlButton) control.Caption = "My button" control.FaceId = 59 In VS 2005, this used to work. But in VS 2010 it doesn't.

CFSTR_FILEDESCRIPTOR/CFSTR_FILECONTENTS 'Copying Files' Dialog missing

我与影子孤独终老i 提交于 2019-12-11 14:59:05
问题 I have a namespace extension that supports copy-paste using the CFSTR_FILEDESCRIPTOR/ CFSTR_FILECONTENTS to copy virtual files to the clipboard. However, the 'Copying Files...' progress dialog does not show up. Explorer appears to hang until the copy operation is complete. Any suggestions as to how to get the progress dialog to work? Thanks, Mridul. 回答1: Well... that was a straight forward fix... Ensure that for the FILEDESCRIPTOR object, FILEDESCRIPTOR.dwFlags |= FD_PROGRESSUI; Mridul. 来源:

Conditionally set OLE definition

眉间皱痕 提交于 2019-12-11 13:44:24
问题 In Clarion, I'm looking to set the definition for an OLE dynamically in a window. Right now, this is how I define two OLE objects in a window: Window WINDOW('Test ActiveX Window'), AT(,,431,92), FONT('MS Sans Serif', 8,, FONT:regular), COLOR(COLOR:White), CENTER, ALRT(F2Key), TIMER(10), GRAY OLE, AT(10,3,11,7), USE(?MyOLE1), HIDE, CREATE('MyActiveX.MyActiveXCtrl.1'), COMPATIBILITY(021H) END OLE, AT(30,3,11,7), USE(?MyOLE2), HIDE, CREATE('SomeOtherActiveX.SomeOtherActiveXCtrl.1'),

what does “OLE The application called an interface that was marshalled for a different thread” after calling RevokeDragDrop mean?

柔情痞子 提交于 2019-12-11 09:51:58
问题 I'm still trying to figure out the answer to this question. I would appreciate a nudge in the right direction (since I have very little experience in OLE). Did anyone encounter a similar error after calling RevokDragDrop? thanks, 回答1: You passed marshaled interface into a different apartment. An attempt to call a method revealed this and the call aborted with this error RPC_E_WRONG_THREAD . You should be careful using interface pointers on multiple threads. If you intend to use a pointer that

Delphi and Internet Explorer, create “global” IE

我的梦境 提交于 2019-12-11 07:56:51
问题 I have some inherited code for opening IE, this is short version : procedure OpenIE(URL: OleVariant; FieldValues: string = ''); var ie : IWebBrowser2; begin ie := CreateOleObject('InternetExplorer.Application') as IWebBrowser2; ie.Navigate2(URL, Flags, TargetFrameName, PostData, Headers); ShowWindow(ie.HWND, SW_SHOWMAXIMIZED); ie.Visible := true; ... end; Since CreateOleObject takes a long time to execute I would like to have one "prepared" IE for the first run. For example in Main FormCreate

Word Add-in keeps Word process alive when document is embedded via OLE

有些话、适合烂在心里 提交于 2019-12-11 07:16:56
问题 I have built a Word Add-in which has to do a task when the user closes the document. I installed an event handler for the DocumentBeforeClose event of the Application object to do that. The problem is that the event handler appears to prevent the Word process from exiting when I embed an existing Word document in an Excel workbook for example. The problem occurs when I embed the document in Excel via the Ribbon Insert > Object > Create from File and then select a Word document. The document

Put multiple Word document windows into the same parent window

∥☆過路亽.° 提交于 2019-12-11 07:03:43
问题 This addin adds 'document tabs' into Microsoft Word, I wonder how it's done? As we know, according to Word's 'Object Model' API, each Word document is associated with a standalone Word window , how can that addin put multiple Word document windows into the same parent window and use tabs to switch among them? Attached this screenshot to illustrate how that addin works: 回答1: No idea how that addin does it specifically, but If I had to guess, i'd say they were putting word into MDI mode,

How to reuse a (Delphi) OLE server with a second client?

ぃ、小莉子 提交于 2019-12-11 06:58:12
问题 I wrote an OLE automation server (using Delphi). I usually start the OLE server manually and use it as a normal application. From time to time I start a client, which automatically connect to the existing OLE Server. When I terminate the client, the server does not terminate (at least when it was started manually before the client) but it won't accept any other OLE connection. Starting another client will trigger a new server instead of reusing the first one. How can I reuse the same server