win32ole

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

寵の児 提交于 2019-12-05 07:40:46
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 code: #!/usr/bin/perl use strict; use warnings; use File::Spec::Functions qw( catfile ); use Win32::OLE qw(in); use Win32::OLE::Const 'Microsoft Word'; $Win32::OLE::Warn = 3; my $word = get_word(); $word->{DisplayAlerts} = wdAlertsNone; $word->{Visible} = 1; my $doc = $word->{Documents}->Open('C:\\PerlScripts\\myTest.docx'); my $tables = $word->ActiveDocument->{

How do I apply formatting to a particular word in a docx file using Win32::Ole in Perl?

北战南征 提交于 2019-12-04 16:47:51
For example, my docx file contains the following sentences: This is a Perl example This is a Python example This is another Perl example I want to apply bold style to all the occurrences of the word "Perl" like so: This is a Perl example This is a Python example This is another Perl example I've so far come up with the following script: use strict; use warnings; use Win32::OLE::Const 'Microsoft Word'; my $file = 'E:\test.docx'; my $Word = Win32::OLE->new('Word.Application', 'Quit'); $Word->{'Visible'} = 0; my $doc = $Word->Documents->Open($file); my $paragraphs = $doc->Paragraphs() ; my

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

谁说我不能喝 提交于 2019-12-04 13:13:45
问题 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 some strange authentication rules in place, and we need the option of saving drafts instead of just sending the message. Apparently win32ole can do this, but I can't find any reasonably simple examples. 回答1: Assuming that the Outlook credentials are

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

大城市里の小女人 提交于 2019-12-03 08:56:29
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 some strange authentication rules in place, and we need the option of saving drafts instead of just sending the message. Apparently win32ole can do this, but I can't find any reasonably simple examples. Tadgh Assuming that the Outlook credentials are stored and you are set to autologin to Outlook, WIN32OLE does the trick quite nicely: require 'win32ole

Any standard guide for Ruby WIN32OLE API? [closed]

夙愿已清 提交于 2019-12-01 11:49:41
I searched a lot on this but haven't yet got any standard or rather systematic guide for Win32Ole in Ruby. Ruby on windows by David is very good but I need a complete, systematic standard tutorial for WIN32OLE ruby APIs. Please suggest! Thanks Pradyumna I fear you may not find one. David Mullet is working on a book but that rather implies that it's still some considerable time away from publication. I need a complete, systematic standard tutorial for WIN32OLE ruby APIs. How "complete", "systematic" and "standard" do you really need it to be? You have to consider that someone needs to have the

Any standard guide for Ruby WIN32OLE API? [closed]

允我心安 提交于 2019-12-01 10:28:24
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I searched a lot on this but haven't yet got any standard or rather systematic guide for Win32Ole in Ruby. Ruby on windows by David is very good but I need a complete, systematic standard tutorial for WIN32OLE ruby APIs. Please suggest! Thanks Pradyumna 回答1: I fear you may not find one. David Mullet is working

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

混江龙づ霸主 提交于 2019-11-30 14:01:47
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 64bit one. After doing some research here is what I found out. The problem is the following line of code: use Win32::OLE::Const 'Microsoft Excel .* Object Library'; I looked inside Win32::OLE::Const module and it seems that the module is looking for that library in the registry. When I printed out all entries from the registry from both 32 and 64

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

余生长醉 提交于 2019-11-29 20:56:25
问题 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 64bit one. After doing some research here is what I found out. The problem is the following line of code: use Win32::OLE::Const 'Microsoft Excel .* Object Library'; I looked inside Win32::OLE::Const module and it seems that the module is looking

Python/Tkinter: Turn on/off screen updates like wxPython Freeze/Thaw?

梦想与她 提交于 2019-11-29 16:43:24
Does Tkinter provide a way to temporarily turn off screen updates (when performing a large amount of screen activity) and then turn on screen updates when the UI updates are complete? Many GUI frameworks have this feature. wxPython provides Freeze and Thaw methods for this functionality. The Windows Win32api supports this as well via LockWindowUpdate( hWnd | 0 ). Googling on "tkinter freeze thaw" and "tkinter lockwindowupdate" came up emtpy. No, Tkinter has no such thing. However, the screen is only updated via the event loop, so if all of your "large amount of screen activity" is happening in

Python/Tkinter: Turn on/off screen updates like wxPython Freeze/Thaw?

故事扮演 提交于 2019-11-28 11:41:01
问题 Does Tkinter provide a way to temporarily turn off screen updates (when performing a large amount of screen activity) and then turn on screen updates when the UI updates are complete? Many GUI frameworks have this feature. wxPython provides Freeze and Thaw methods for this functionality. The Windows Win32api supports this as well via LockWindowUpdate( hWnd | 0 ). Googling on "tkinter freeze thaw" and "tkinter lockwindowupdate" came up emtpy. 回答1: No, Tkinter has no such thing. However, the