Questions tagged [ole-automation]

OLE-Automation is a Microsoft COM based technology that allows one application to control another via an exposed public interface.

103 questions
0
votes
0 answers

SQL Server 2017 Ubuntu Ole Automation Procedures

I installed and configured SQL Server 2017 on Ubuntu 16.04, with developer license. The installation works fine, I can connect to it with Management Studio as well, and restore databases from .bak files. But I can't find any solution, or alternative…
NemoPeti
  • 79
  • 1
  • 7
0
votes
0 answers

SQL Server 2017 Linux Docker Ole Automation issue

I've installed SQL Server Developer Edition on Linux Docker When running this DECLARE @win int DECLARE @hr int EXEC @hr=sys.sp_OACreate 'WinHttp.WinHttpRequest.5.1',@win OUT I get error: Msg 17750, Level 16, State 0, Procedure sys.sp_OACreate,…
Elnur
  • 111
  • 1
  • 8
0
votes
0 answers

SQL SERVER sp_OACreate Throws an error "ODSOLE Extended Procedure" after executing for 128 rows

I need to extract matching texts from a input based on a regular expression. As there are no built in support for regular expressions in SQL Server, I have written the following UDF to get the job done. CREATE FUNCTION GetMatch ( @Pattern…
0
votes
0 answers

Unexpected blank spaces in Mail body generated via sp_send_cdosysmail

I'm facing a strange problem with sp_send_cdosysmail OLE Automation. I have a store procedure that will convert a temp table into html table and send them as mail body to distribution list. Problem is when the no of lines are more than 100 (x 13…
0
votes
0 answers

PowerDesigner COM object is empty on Windows Server 2012

We have a problem when scripting PowerDesigner on Windows Server 2012. We don't have problems on Windows 10 and Windows 7 (we tried it on several machines). We are starting PowerDesigner from PowerShell like this: $PowerDesigner = New-Object -com…
0
votes
1 answer

How can I debug being unable to call a web service via SQL (OLE Automation)?

I'm calling a web service from SQL. That may sound strange, but nevertheless, that's what I'm doing. My code can call an online (public) web service (HTTP GET), but when I try to call a service in the same AWS environment (Also HTTP GET), the…
0
votes
1 answer

How to convert Java Date to OADate or vice versa?

I want to convert Java Date to Microsoft OLE Automation - OADate type or want to convert OADate to Java Date. What is the formula of the OADate for Java? Actually I have searched in the stackoverflow and couldnt find the answer, I got the answer and…
msari
  • 147
  • 2
  • 12
0
votes
1 answer

Edit Merge Field in Word Document Programmatically

I'm using Delphi 7 to process mail merge document, the document already created outside delphi and is fixed with merge fields, my goal is to edit (change) those merge field through delphi 7. Let just say i have merge field named 'field1', i have to…
0
votes
1 answer

Accessing an ITypeInfo that references an ITypeInfo from an importlib-ed unregistered type library causes TYPE_E_CANTLOADLIBRARY error

I am using the Automation API from .NET (System.Runtime.InteropServices.ComTypes) to inspect a type library Bar.tlb that I generated myself (see below). This type library declares an interface IBar which inherits from interface IFoo which is defined…
stakx - no longer contributing
  • 83,039
  • 20
  • 168
  • 268
0
votes
1 answer

Copy an Excel Workbook Variable in VBA

Suppose you have 2 Excel.Workbook variables wbA and wbB. The first variable is a workbook you have assigned with something like Excel.Workbooks.Open. Now my Question: How can you assign wbA to wbB so that wbB is a copy of wbA and not just a…
Xam Eseerts
  • 367
  • 3
  • 19
0
votes
1 answer

Why does the supposedly-saved file not really get saved?

The following code is taken from this tutorial to create and save an Excel file with C#: using Excel = Microsoft.Office.Interop.Excel; namespace WindowsFormsAppExcelTest { public partial class Form1 : Form { public Form1() …
0
votes
1 answer

How can I deal with "no constructors defined" and "type cannot be embedded" exceptions?

After adding the Excel 12 reference (which added Microsoft.Office.Interop.Excel and VBIDE DLLs), I copy-and-pasted the code from here, namely this: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using…
0
votes
1 answer

Open word document in readonly mode

I'm using automation to open documents in Word. Sometimes I need to open document in Read mode ON: var WordDocument: _Document; WA: TWordApplication; begin WA := TWordApplication.Create( nil ); WA.OnQuit :=…
Roman Marusyk
  • 23,328
  • 24
  • 73
  • 116
0
votes
1 answer

TWordApplication handle change ReadOnly state

I'm working with MS Word files use TWordApplication. I need show message when document was changed by user, but when document is ReadOnly then message shouldn't be show. I have problem when open readonly document and then user can select View -…
0
votes
1 answer

How do I get the text from text- and formfields in Word 2013 with Delphi XE7?

I built a small program to read the all the text from a .docx with Delphi. It works with normal text and with quick parts but none of the solutions I found in forums and tutorials works for my textfields or form fields. I'm using Word 2013 and…
Lea
  • 261
  • 5
  • 14