Questions tagged [ole]
OLE Automation, is an inter-process communication mechanism based on Component Object Model (COM).
1,220
questions
0
votes
0answers
27 views
OLE Automation - Ghost Excel Instance in Task Manager
I am using wxAutomationObject to export data to MS Excel. I have created a few helper classes ExcelApp, ExcelWorkbook etc... all of which inherits from wxAutomationObject.
Briefly, ExcelApp is as ...
0
votes
2answers
46 views
Convert Excel VBA to C++Builder OLE API
how to convert the following VBA code to c++ builder in OLE? Thanks.
Range("A10:B28").Select
ActiveSheet.Shapes.AddChart2(240, xlXYScatter).Select
ActiveChart.SetSourceData Source:=Range(&...
2
votes
2answers
76 views
Accessing some Outlook OLE object properties fails in a Win10/Exchange Online environment
I have some older code connecting to Outlook through OLE that no longer works running on Win10 where Outlook is set up to connect to Exchange online:
It raises an exception with message (Dutch) "...
0
votes
0answers
30 views
OLEObject export to file path - MSACESS
I have a button in MS access to export an OLE word document.
Private Sub Command25_Click()
Set OLEobj = Me.POLICY_OLE
OLEobj.SaveAs Me.TRANSACTION_TYPE.Value & Me.TRANSACTION_NUMBER.Value ...
0
votes
0answers
55 views
Send Mail via Mail Client
I'm trying to send a filled and "formatted" TMemo via EMail using Outlook.
I used to do this via
ShellExecuteA(Handle, "OPEN", "mailto:xx@xx.xx?subject="+ OASubject + &...
1
vote
0answers
24 views
Why the flag bit LOAD_TLB_AS_64BIT of LoadTypeLibEx does not take effect
sample code
ITypeLib* pp;
TLIBATTR* a;
//C:\Program Files\Microsoft Office\Office15\MSPPT.OLB
LoadTypeLibEx(_T("C:\\Program Files\\Microsoft Office\\Office15\\MSPPT.OLB"), (REGKIND)(...
0
votes
0answers
22 views
How to extract OLE objects from MS word document?
I have a requirement of reading data from a OLE object present in MS word document using python.
Can anyone help me on this.
0
votes
0answers
46 views
IDataObjectAsyncCapability not being handled by Outlook in OLE Drag and Drop
I work on an electron application, and we would like to support dragging and dropping .msg files from our app into Outlook (or the Windows shell, or wherever, but primarily Outlook). The files will ...
0
votes
0answers
22 views
VBA import pdf to excel and crop
I am working to scrape pdf's in an environment where I cannot utilize the adobe library. Generally I'm importing to word, saving as text and then scraping via an EOF loop. Some PDF's just don't save ...
0
votes
0answers
25 views
Why MsAccess VBA code gives OLE or ActiveX error
I have to use two different Win10-s and two different Office versions with the same file.
To demostrate my problem I've created a simple 1 file MsAccess database. It has only one table with one field -...
0
votes
0answers
13 views
Getting PDF, XLSX, DOCX file corrupted when reading in Java from MS-access DB which is stored as a Blob
This is the piece of Code i tried in Java
Blob blob = rs.getBlob("attach");
InputStream input = blob.getBinaryStream();
byte[] buffer = new byte[(int) blob.length()];
File file = new File(&...
0
votes
1answer
35 views
In .NET, how do I free memory for a 0-terminated unmanaged Unicode string, which was allocated by OLE?
I obtain a pointer to a 0-terminated Unicode string in the pwcsName field of the STATSTG structure, by using the IEnumSTATSTG::Next method.
The memory for it was allocated by OLE, but it is the caller'...
0
votes
1answer
60 views
Where is Base64 code in TheFatRat Microsoft reverse shell document?
I've created a reverse shell Microsoft Word document with TheFatRat which mostly creates reverse shells!
Now , I want to reverse engineer it, So I brought up the REMNUX(Ubuntu with some reverse ...
0
votes
0answers
35 views
OLE automation WordBasic macro for signing document
I am looking for a way how to sign a Word document using OLE automation.
Is there a macro of WordBasic object which I could use?
Something like Signatures.Add in VBA.
Thanks for help.
0
votes
0answers
27 views
How to hide toolbar in OleContainer?
I want to display the content of a Word document on a form. But after displaying, the toolbar appears. How to remove this panel?
OleContainer1.CreateObject('Word.Application', false);
OleContainer1....
0
votes
0answers
43 views
How do I add a menu button to my OLE Contained Office application?
I am using an OLE-Container for my embedded word and excel applications.
Im trying to create a custom "File" Button as you'd know it from the Standard word file, except that it has my own ...
0
votes
0answers
51 views
Export OLE object (image) from accdb file to folder
I've tried using this method to export an ole object (image) but it keeps saying run-time error 438 object doesn't support this property or method on this line:
OLEobj.SaveAs "Test" & Me....
0
votes
1answer
22 views
Writing OLE compound files with python 3
I have two bytestream, these data should be dump in a compound OLE file both together in a container. I just checked that there are some third party libraries to do it, but I would like to do it with ...
0
votes
1answer
38 views
Do I need to clean up unmanaged code after obtaining an IStorage object from OLE32?
I obtain an IStorage object from OLE32's StgCreateStorageEx function. Here is its declaration:
Imports Microsoft.VisualStudio.OLE.Interop
<System.Runtime.InteropServices.DllImport("ole32.dll&...
0
votes
0answers
49 views
Who is an owner of data rendered by IDataObject::GetData?
Documentation wording on that matter is somewhat confusing. First it states:
The caller then assumes responsibility for releasing the STGMEDIUM structure
then in parameters description:
A pointer ...
0
votes
0answers
15 views
Is there a way to add a button to a worksheet which opens an embedded OLE object (xps image)
what the code does...
combines a chart object onto an existing Excel worksheet, exports to an xps file, loads the xps file into an OLE Object.
To view the "picture" xps embedded in the OLE ...
1
vote
0answers
12 views
SSIS error with Oracle - Exception deserialzing the package “Value does not fall within the expected range”
I am taking an existing SQL Server 2016 SSIS package and trying to add an Execute SQL Task. I'm suspicious that the task itself isn't the problem, but just in case, I'll explain it.
It is a simple ...
0
votes
1answer
49 views
why my IUnknown release function block my child thread?
In my C application, I have a child thread that retrieve a IUnknown interface at beginning of his life :
static struct IUnknown* punk = NULL;
void DispatcherStart(){
CoInitialize(NULL);
...
0
votes
0answers
29 views
IDispatch::GetIDsOfNames is returning rpc_e_call_rejected call was rejected by callee
When I'm trying to initiate printing after opening a word document, I need to get the details of all running documents to find out the filename (with its filepath) of that document to do my processing ...
0
votes
1answer
27 views
Is there any way to know if the user pressed “send” or “X” button after the new mail window opened via outlook from powerbuilder?
Is there any way to know if the user pressed "send" or "X" button after the new mail window opened via outlook from powerbuilder? I want to pop up a message after "send" ...
0
votes
1answer
25 views
C IUknown_QueryInterface_Proxy cause General protection fault
I am trying to do some COM/OLE, here is my code :
static struct IUnknown* punk = NULL;
static IDispatch* UIRManager = NULL;
void DispatcherStart(){
CoInitialize(NULL);
HRESULT retour = ...
0
votes
1answer
12 views
COM - C++ Invoke function return DISP_E_TYPEMISMATCH [duplicate]
I'm currently trying to call an ActiveX function of a software using COM.
here is the function declaration :
[
id(0xa),
helpcontext(0)
]
HRESULT MAIN_GetVersion (
[...
1
vote
1answer
65 views
How can I get TypeLibInfo from an ITypeLib pointer?
I would like to use the tlbinf32.dll to read type info for a COM object. At the moment I have access to the pointer to the ITypeLib interface. I can use VTable offsets and DispCallFunc to manually ...
0
votes
0answers
30 views
application automation in MacOS (like OLE in Windows)
In Windows, developers are able to write a program, letting it automate lots of applications (such as Photoshop, Office Word) which are not in the same process as the program itself, provided those ...
0
votes
0answers
72 views
How to register Windows APO dll?
While trying to learn Windows Audio Processing Objects (APOs), I came across the blog post Try to implement APO, the deepest part of the Windows (it's in Japanese, so Google translate should be "...
0
votes
1answer
51 views
GetIDsOfNames always fails with RPC_E_SERVERCALL_RETRYLATER for getting a property ID in Photoshop
I wrote the following C++ code, trying to perform some OLE automation tasks
for currently-running Photoshop:
IUnknown* unk = NULL;
IDispatch* disp = NULL;
CLSID clsId;
if (FAILED(...
0
votes
0answers
105 views
OLE DB or ODBC error in Microsoft PowerBI while importing data from Azure Synapse
I am trying to import a view (having 700M rows)from Azure Synapse in Microsoft Power BI, while it works intially and imports around 70M rows successfully but the connection gets dropped after that and ...
0
votes
0answers
14 views
Mingw Undefined reference to IDispatch_GetIdsOfNames_Proxy
When trying to do automation using C with Mingw.
I have to use some proxy function to use IDispatch->GetIDsOfNames(...) like IDispatch_GetIDsOfNames_Proxy(IDispatch* ptr, ...) or ...
0
votes
0answers
29 views
Get Visio shape data from an embeded Excel object
I have an embedded Excel-Sheet in Visio that represents the content of an array. Filling this sheet works fine.
What I want to do is, on one hand get shape info of the visio doc in my Excel sheet and ...
0
votes
1answer
59 views
How do I get a member from an IDispatch interface which is an “array”?
I am a C programmer, but I am new to Windows & COM programming.
For the following C# code:
//Change the font of the selected text in the running PowerPoint.
Application app = Marshal....
0
votes
0answers
10 views
How to access PyIStorage reference
Currently, I am attempting to find the package in which I can import the object PyIStorage. In my code,
I am wanting to ensure the object being passed is of the class PyIStorage, but I cannot find the ...
1
vote
1answer
58 views
Creating MS Word documents with Go OLE binding
I've been playing around and learning how to make Word docs programmatically. I know it can easily be done using pywin32. This simple snippet retrieves the default Visual Basic "code" inside ...
0
votes
1answer
179 views
Delphi program no longer starts Excel
Delphi Rio, Win10 64 bit, Excel 2016-64 bit. I have a utility I wrote in Delphi a while back. It opens an html file, starts Excel, parses the html file, and dumps various parts into Excel. It has ...
0
votes
0answers
31 views
How to retrieve IVsDebugger from external DTE for automation in Visual Studio 2019
I am trying to write a VSIX for Visual Studio 2019 that controls multiple instances of the Visual Studio IDE. We are working on a networked project that requires some automation to perform testing of ...
0
votes
1answer
28 views
Excel file can not be saved in PHP COM Application
we are having issues saving excel sheets in PHP.
Minimalistic code:
// R: is a Ramdisk
$filename = 'R:\\sheets\\ExcelFile_123.xlsx';
$application = new COM("Excel.Application", null, CP_UTF8)...
1
vote
1answer
175 views
Collecting emails from Outlook Inbox with Delphi
I wrote some code to read emails from Outlook Inbox and collect attachments.
This is working just fine. I am using Outlook 2019/Office 365.
I can use both Mail.SenderEmailAddress or Mail.Sender....
1
vote
1answer
42 views
How to launch OneNote and bring it to the foreground using OLE automation?
I've been struggling bringing OneNote to the foreground using OLE automation. When I run the following code, OneNote loads in the background and I'm not able to bring it to the foreground. I haven't ...
1
vote
1answer
69 views
OleAutoObj is not opening Excel application in my PC
Following dxl code is not opening an excel application in my PC. I suspect an earlier dxl script which I ran. It activated Excel Ole Objects and opened them. How to close all excel processes which ...
1
vote
1answer
24 views
Export .docx from OLE object data [closed]
The problem I have is, that when I read an embedded (ole) (.docx) object from "Access" database .docx. I look for the " 50 4B 03 04 14 00 06 00 " hex header using c#.net. I ...
0
votes
1answer
62 views
OLE Drag and Drop: use wide char or not?
Implementing IDropSource requires to create and fill a DROPFILES structure.
The fWide member specifies whether a wide string should be used or not.
Since I'm drag-dropping files to the Windows file ...
1
vote
4answers
93 views
Append extra null char to wide string
Some Win32 API structures require to concatenate an extra null character to a string, as in the following example taken from here:
c:\temp1.txt'\0'c:\temp2.txt'\0''\0'
When it comes to wide strings, ...
0
votes
0answers
57 views
Disable all messages when open DWG
I'm developing application for converting DWG to PDF. Developing on Delphi using AutoCAD OLE. The best solution I found it's using Publish command. It work OK, but the problem is when I open DWG file ...
0
votes
1answer
49 views
Can you restore a word document from 97-2003 only using its Compound File streams? [closed]
I am trying to recover a word document that was using 97-2003 version. I do not remember why I did this, but I saved off the Compound File streams into a folder, and it is definitely something I would ...
1
vote
1answer
374 views
Name conflict in Excel files by OLE
Developing program for converting from Excel files to PDF. Here is my code:
procedure ExcelToPDF(const InputFileName, OutputFileName: string);
var
Excel: Variant;
Workbook: Variant;
...
0
votes
0answers
88 views
C++ std::swap - Does it swap data or data pointers?
I'm using std::swap with OLE BSTRs.
I would like to confirm that this function swaps the data pointers and not the strings themselves.
Is this the case?