ole

Vista focus issue when invoking Microsoft Word spell check from Oracle Forms

南笙酒味 提交于 2019-12-10 23:16:58
问题 Friends, In testing our Oracle Forms application on Vista I have found a interesting "challenge". The application can invoke the Microsoft Word spell checker to perform a spell check on a field. When invoked, the user is shown the standard Microsoft Word spell checker dialog window. Word itself is invisble to the user. The Spell Checker is invoked from Forms using Automation and the method used is based on the metalink note: 295449.1 How To Integrate The MS Word Spell Checker With Forms Using

Why is my COM factory never released during the program lifetime?

不想你离开。 提交于 2019-12-10 18:37:12
问题 I have a native C++ ATL in-proc COM server. A separate test program calls CoInitialize() , calls CoCreateInstance() , then calls Release() on the pointer, then calls CoUnitialize() and exits. If I run the test program under Visual C++ debugger the debug CRT reports a single memory leak and each time the allocation number is the same. I used an allocation hook and found out that the object not being returned to the heap is the class factory object. So basically the following happens: the

automate excel file processing in perl and avoid dialog/UI interactions

岁酱吖の 提交于 2019-12-10 13:47:35
问题 How can a I guarantee that no pop-up dialogs will appear when I automate Microsoft Excel through OLE? I'm using a Perl module (Win32::OLE). I can avoid most dialog pop-ups using the following code: use Win32::OLE; use Win32::OLE::Variant; use Win32::OLE::Const; my $excel_symbols = Win32::OLE::Const->Load('Microsoft Excel'); my $excel = Win32::OLE->new('Excel.Application', sub { $_[0]->Quit();} ); $excel->{'Visible'} = 0; $excel->{'DisplayAlerts'} = 0; $excel->Workbooks->Open('c:\some_excel

hooking explorer drag drop fails

依然范特西╮ 提交于 2019-12-10 12:17:13
问题 The big picuture: I am trying to inject my own own wrapper around explorer's drag n drop. My code is injected into explorer, and I try to replace the drop target with my own. In order to do this I am doing: Find all explorer windows (using EnumWindows and checking process association for each window). For each window I am running the following (do nothing) code: IDropTarget* lpDT = (IDropTarget *)GetProp(hwnds[i], L"OleDropTargetInterface"); //get existing drop target HRESULT res1 = :

Save an embedded Word document in an Excel spreadsheet to disk using VBA

拟墨画扇 提交于 2019-12-09 19:10:14
问题 We have a Excel spreadsheet that currently generates a report using a Word template stored on the company LAN. This works fine for internal users but not for anyone not connected to the LAN e.g. laptop users. Management does not want to distribute the template as a seperate file to external users but would prefer to embed this into the spreadsheet on a hidden worksheet. It is then proposed that when generating a report that the embedded template would then be saved to the users temp path and

Getting application title from a Word OLE application object

空扰寡人 提交于 2019-12-09 12:46:36
问题 Is there a way of getting the window title from a Word.Application OLE object? I'd like to use it to try get the window using FindWindow . I'm creating an OLE object and adding an existing document, like so: App := CreateOLEObject('Word.Application'); App.Visible := True; App.Activate; Doc := App.Documents.Open('File.doc'); At this point, the caption values are the following: App.Caption => 'Microsoft Word' Doc.ActiveWindow.Caption => 'File.doc [Compatibility Mode]' However, the window title

Delphi - Adding BCC & CC Recipients to OLE Outlook object

China☆狼群 提交于 2019-12-08 05:17:09
问题 The answer to the post " How is working with Outlook in Delphi different than other email clients? works great. See below. Using this example how would you go about adding CC and BCC recipients? USES OleCtrls, ComObj; procedure TForm1.Button1Click(Sender: TObject); const olMailItem = 0; var Outlook: OLEVariant; MailItem: Variant; MailInspector : Variant; stringlist : TStringList; begin try Outlook:=GetActiveOleObject('Outlook.Application') ; except Outlook:=CreateOleObject('Outlook

Why are the number of pages in a Word document different in Perl and Word VBA?

不想你离开。 提交于 2019-12-08 01:49:06
问题 I have a (set of) Word document(s) for which I'm trying to get various properties (number of pages, author, etc) using Win32::OLE in Perl: print $MSWord->Documents->Open($name)-> BuiltInDocumentProperties->{"Number of pages"}->value . " \n"; This returns 4 pages. But the actual number of pages in the document is 9. The number of pages in the first section is 4. I want the total number of pages in the document. If, within Word VBA, I do the following: MsgBox ActiveDocument

How do I deploy a utility with ocx dependency to a test machine without registering the ocx?

[亡魂溺海] 提交于 2019-12-08 01:34:35
问题 I have a test utility that depends upon an ocx file that is installed/registered on my development machine. We'd like to run this tool on a test machine without polluting the machine with any unnecessary files. Nothing should be installed except the target machine software. Running the tool on a network drive or from a stand-alone directory copied to the test machine would be ideal. But, registering the ocx on the test machine is out of the question. Placing the ocx file in the same directory

多sheet页 Excel文件上传

ε祈祈猫儿з 提交于 2019-12-07 22:41:20
DATA lv_filename TYPE string. TYPES:BEGIN OF ty_excel, werks TYPE marc-werks, bwart TYPE matdoc-bwart, cpudt TYPE matdoc-cpudt, "凭证日期 budat TYPE matdoc-budat, "过账日期 hsdat TYPE matdoc-hsdat, "生产日期 lifnr TYPE matdoc-lifnr, "供应商 20181031 lgort TYPE matdoc-lgort, insmk TYPE matdoc-insmk, "库存类型 matnr TYPE matdoc-matnr, erfmg TYPE matdoc-erfmg, charg TYPE matdoc-charg, erfme TYPE matdoc-erfme, exbwr TYPE matdoc-exbwr, zhxm TYPE zmmb011_t-zhxm, END OF ty_excel. DATA: gt_excel TYPE STANDARD TABLE OF ty_excel. PARAMETERS p_file TYPE rlgrap-filename MODIF ID imp. lv_filename = p_file. CALL FUNCTION 'ZBC