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
0
votes
1 answer

Watir::Element ole_object value when accessing object directly vs. using collection

Let's say I have a single link with a class 'example'. a(class: 'example').ole_object returns nil, whereas as(class: 'example').first.ole_object returns a WIN32OLE object. Why?
cafe_
  • 213
  • 3
  • 9
0
votes
1 answer

WIN32OLE.connect("winmgmts://") returns nil with JRuby

I am trying to check if a process exists in JRuby on a Windows 7 machine. I'm trying: require 'jwin32ole' wmi = WIN32OLE.connect("winmgmts://") processes = wmi.ExecQuery("select * from win32_process") However, WIN32OLE.connect("winmgmts://") is…
DDx
  • 9
  • 4
0
votes
1 answer

Calculating Private Working set memory in perl

I'm basically trying to query private working set of a process in perl. I have already refereed this post. The solution works great on win8/8.1 but for some reason the following line returns nothing on win7x64 and I have tried using IDProcess…
user3354265
  • 777
  • 1
  • 10
  • 26
0
votes
1 answer

Open file Using Win::OLE without Office

I'm using Win32::OLE for parsing an the Excel file. I can't use Microsoft Office on my machine so I installed Excel Viewer. Following is the code that I'm using to init the OLE my $Excel = Win32::OLE->new('Excel.Application') or die…
Ankul
  • 53
  • 9
0
votes
1 answer

create help file in txt from a ms word document

I need to create a txt file from a ms word document. The txt file will be used as a help document for my user interface and therefore it needs to be in a special format. Is there any third party software that I can use to read a ms word doc and…
user3676724
  • 13
  • 1
  • 4
0
votes
1 answer

Add style (format) to cell of MS Excel document using Ruby with win32ole

By default a cell in MS Excel has format "number". If you put value '2/2' to a cell Excel converts it to date. How to change the format of cell to Text using 'win32ole'? I want to put '2/2' and see exactly '2/2'. When I talking about 'win32ole' I…
Evmorov
  • 1,134
  • 22
  • 28
0
votes
1 answer

Ruby Script to color all sheets present in excel with a particular colour

I need a ruby script to color all the sheets present in excel workbook with a fixed colour...all at once.... here i need to color this sheet with yellow color but the coloring should be only for cells with filled data.Something lik ethis
anurag
  • 145
  • 1
  • 1
  • 8
0
votes
1 answer

IWebBrowser2 facebook login

I'm working on a windows based application in C++ that requires facebook login. I'm using using Ole Embedding/ActiveX control with the CLSID_WebBrowser component (IWebBrowser2) to do the authentication. This works pretty well in so far as I create a…
0
votes
2 answers

Porting Visual Basic staements to Perl Win32::OLE ones

I read all the standard Win32::OLE texts such as Jan Dubois' classic and of course the official package doc, Microsoft's terse article and many others. What I miss are rules to convert a captured VBA Excel macro statement into a Perl Win32::OLE…
MeirG
  • 333
  • 2
  • 14
0
votes
1 answer

error while trying to create DTE2 Interface object with ruby

I am trying to use ruby win32ole lib and DTE2 Interface to control visual studio 8 \ tried this require 'win32ole' ide = WIN32OLE.new('EnvDTE80.DTE2') and received this error unknown OLE server: EnvDTE80.DTE2 what am I doing wrong, can this…
Dan
  • 397
  • 1
  • 3
  • 9
0
votes
1 answer

Range(Selection, Selection.End(xlDown)).Select

How can I convert the following excel vba statement to perl win32::ole statement? Range(Selection, Selection.End(xlDown)).Select I've converted as follows, but doesn't work: my $Excel = CreateObject OLE "Excel.Application"; my $SecondSht =…
Abbas
  • 3,872
  • 6
  • 36
  • 63
0
votes
2 answers

How to use IPictureDisp::Invoke to correctly invoke the Render member

I have a 23x23 bitmap which I'm loading from a file into an instance of the IPictureDisp COM interface. I'm loading the picture using OleLoadPicture, passing IID_IPictureDisp. Please assume that this is working and returning me a valid pointer to…
0xbe5077ed
  • 4,565
  • 6
  • 35
  • 77
0
votes
0 answers

How to get value by reference from WIN32OLE::ARGV?

Below code returns 0 v = 0 obj.foo('',0) printf("v : %d \n", WIN32OLE::ARGV[1]) when really it must return another value by reference. For example in python it works like here: v = obj.foo('') print('v : %d' % v) I don't get yet how to make same…
cnd
  • 32,616
  • 62
  • 183
  • 313
0
votes
1 answer

How do you use ruby's WIN32OLE to get an instance of a non "IDispatch" interface?

I want to access the CUIAutomation object via Ruby. OLE/COM object viewer reports the following details: [ uuid(FF48DBA4-60EF-4201-AA87-54103EEF594E), version(1.0), helpstring("The Central Class for UIAutomation") ] coclass CUIAutomation { …
Nigel Thorne
  • 21,158
  • 3
  • 35
  • 51
0
votes
1 answer

Perl Excel - Inserting an empty row with row,col numbers from vairable

When trying to insert an empty row using the following code my $StartRow = "101"; my $StartCol = "1"; $Sheet->Cells($StartRow,$StartCol)->EntireRow->Insert; Error Occurred: Win32::OLE(0.1709) error 0x800a03ec in METHOD/PROPERTYGET "Cells" at…
Siva
  • 294
  • 1
  • 9
  • 25