Questions tagged [win32ole]

Object Linking and Embedding (OLE) is a proprietary interface to Microsoft applications. Most notably the Microsoft Office suite.

Object Linking and Embedding is an API provided by Microsoft to allow for control operations with Microsoft Applications.

Perl can make use of this API using the Win32::OLE module. Ruby also has a WIN32OLE class which does much the same.

However the primary scripting language is VBA, and Microsoft supply a variety of examples via MSDN

May be synonymous with the OLE tag, although anyone specifying Win32::OLE (or WIN32OLE) is probably specifically using Ruby or Perl.

Ref: Wikipedia:OLE

213 questions
13
votes
4 answers

How can I programmatically discover a Win32::OLE object's properties and methods in Perl?

With Perl, it's quite easy using the Win32::OLE library to load up COM/OLE objects and control them. The issue I'm running into is knowing exactly what methods and properties are available in the object I'm accessing. Some OLE toolkits in other…
Robert P
  • 15,707
  • 10
  • 68
  • 112
8
votes
1 answer

List of Perl commands to manipulate Windows Excel with Win32::OLE module

Has anyone a list of the Perl commands to manipulate Excel on Windows with the basic Win32::OLE module? In particular, I am thinking of the following operations: Opening and saving an Excel file Reading/Updating values Reading/Updating…
Jean-Francois T.
  • 11,549
  • 7
  • 68
  • 107
8
votes
0 answers

Acessing Windows COM Objects in node.js

I'm working with an API that has a COM-based interface. I've been using the win32ole module to instantiate the API, but one of the API functions requires a null value, and win32ole complains when a null argument is passed. I found this workaround,…
Nocturno
  • 9,579
  • 5
  • 31
  • 39
8
votes
2 answers

How to make Win32::OLE work on 64bit MS OFFICE installation

I have two PCs, one has MS Office 2013 32bit installed and another MS Office 64bit installed. I have Perl code that is using Win32::OLE Perl module to manipulate XLS spreadsheets. The code is working perfectly fine on 32bit PC, but has a problem on…
Andrey
  • 1,808
  • 1
  • 16
  • 28
6
votes
0 answers

Electron: How to access .Net COM Objects

I am trying to create a simple application using Electron quick start. its going to be run on windows 10 where I need to access few .Net COM objects installed on that machine. When I google about this I am directed to win32ole package that needs to…
Kiran
  • 2,997
  • 6
  • 31
  • 62
6
votes
3 answers

Read MS Word table data row wise using win32:ole perl

I am new to win32:ole module in perl. I am trying to print MS word table data row wise on command prompt. But I am able to print only last row of the table. Can you please help me to solve this problem? Thanks in advance. Below is my …
Aparna Savant
  • 337
  • 1
  • 6
  • 18
5
votes
2 answers

What's the easiest way to send a message through Outlook with Ruby?

My work requires me to automate e-mail generation for certain tests. I've been looking around but havent been able to find a reasonable solution that can be implemented quickly. It needs to be in outlook and not some other mail server as we have…
4
votes
3 answers

Use Ruby to permanently (ie, in the registry) set environment variables?

On Windows, how can I use Ruby to permanently set an environment variable? I know I need to change the registry (through the win32ole module?) but I am a novice with regard to scripting the registry. I understand that I can say ENV['FOO'] =…
Noah Sussman
  • 4,576
  • 2
  • 28
  • 25
4
votes
2 answers

what's gem can operate Excel on linux?

My users will update their Excel to my system and I will get some information from it, I know the gem that named "win32OLE" on windows is run well, but my system is ubuntu, so how can I operate it?
ethan
  • 620
  • 1
  • 6
  • 25
4
votes
1 answer

Unable to save Excel file after modification using Ruby & win32ole

Using http://ruby-doc.org/stdlib/libdoc/win32ole/rdoc/classes/WIN32OLE.html as a guide I have written the following: require 'win32ole' excel = WIN32OLE.new('Excel.Application') excel.visible = false #Setting this is 'true' doesn't reveal…
Mark Cramer
  • 2,614
  • 5
  • 33
  • 57
4
votes
2 answers

Ruby win32ole - how to determine the OLE class type, whether the OLE class supports a method

I am using Ruby 1.8. Using the WIN32OLE module - 1) How do I determine the class name of an OLE object instance? 2) How can I tell whether an object instance supports a particular method? In an Outlook automation script, I am trying to delete the…
bvanderw
  • 1,065
  • 2
  • 12
  • 20
4
votes
1 answer

Using Perl and Win32::OLE, how can I convert a numbered list in a Word document to plain text?

I have written a Perl script to read Microsoft Word document content using Win32::OLE. My problem is that the document containing a numbered list (starts with 1, 2, 3, …). My Perl script is not able to get that number. I can get only the text…
Swaiya
  • 53
  • 5
4
votes
2 answers

win32ole process still running in ruby

I know this question has been asked when using VB directly, but I am having trouble terminating a process. I'm using the jruby version of win32ole and ruby 1.9. My current code is something like this: begin excel =…
janDro
  • 1,426
  • 2
  • 11
  • 24
4
votes
1 answer

How can I copy and paste a range of tables in Word?

EDIT: If you have an example in VBA, I'll take it. I'm just trying to understand how to use the Range object with the Tables collection to copy and paste multiple tables without looping. Put another way, how can I specify a range of 1..lastTable…
romandas
  • 4,086
  • 7
  • 29
  • 33
3
votes
1 answer

How does Ruby know which OLE object is enumerable?

I was working with Ruby and WIN32OLE (which is specifically, Excel). I found all those enumerable objects, such as Range.Columns, are automatically enumerable in Ruby, and can be iterated using obj.each method. I am wondering how it works? I…
SwiftMango
  • 15,092
  • 13
  • 71
  • 136
1
2 3
14 15