Quoting Glen Plantz <[EMAIL PROTECTED]>:
> Hi Folks,
>
> I'm getting an error when I try to execute the "SaveAs" function in
> Win32::OLE" when I try to save an Excel worksheet to a new format.
>
> ( I'm using the " csv " format here, but I _really_ want to save each
> sheet in the workbook as a
This will insert text at the beginning of a document.
use strict;
use warnings;
use Win32::OLE;
my $oWord = new Win32::OLE("Word.Application");
my $clBlue = 16711680;
my $clGreen = 32768;
my $oDoc = $oWord->Documents->Add();
$oWord->Selection->TypeParagraph;
$oWord->Selection->Font->{Size} =
Instead of:
$Word->ActiveDocument->PageSetup->{TextColumns} =
$Word->SetCount({NumColumns=>1)|| die "can't create columns".
Win32::OLE->LastError();
Try this:
$Columns = $Word->ActiveDocument->PageSetup->{TextColumns};
$number = $Columns->{Count};
print "--$number ---\n";
$Columns->Add()|| die "
Instead of:
$Word->ActiveDocument->PageSetup->{TextColumns} =
$Word->SetCount({NumColumns=>1)|| die "can't create columns".
Win32::OLE->LastError();
Try this:
$Columns = $Word->ActiveDocument->PageSetup->{TextColumns};
$number = $Columns->{Count};
print "--$number ---\n";
$Columns->Add()|| die "
place = $search->Replacement;
>
> $search->{Text} = "searched";
> $replace->{Text} = "replace";
> $search->Execute({Replace => wdReplaceAll});
>
> $doc -> Close();
> $word -> Quit();
>
> -
>
>
>
> B
This may not be the best way but it works for me.
my $doc = $word -> Documents -> Open("c:/test.doc");
my $oRange = $doc->Range();
my $oRange->EndOf;
my $oFont = $oRange->{Font};
$oRange->{Text} = "Hello";
$oFont->{Color} = $clBlue;
$oRange->{Text} .= "\nWorld";
--
Nathaniel G. Bartusiak
TTMS,
> Sorry forgot to change the label
>
>> I am tring to align the test in the cell but it no workie and it is
>> driving me nuts
>>
>> $RangeValue = "J1";
>> $Alignment = "xlCenter";
>>
>> $Working_Alignment = $Book->Worksheets($SHEET_NAME);
>> $Working_Al
> Now Iam searching for the solution to do the following with win32::ole
> -open .doc file-> no problem
> -make and copy a range of pages-> problem
> -create a new document -> no problem
> -paste into new document-> problem
> -clo
> Guys,
>
> I'm reading data from an excel spreadsheet, using win32-ole.
>
> Rather than having lots of lines like this...
>
> my $varA = $active_sheet->Cells("$working_row","A")->{Value};
> my $varB = $active_sheet->Cells("$working_row","B")->{Value};
> my $varC = $active_sheet->Cells("$working_ro
> PPS: Summary of answers to other questions:
>
> FreezePanes (to make only a lower/to-right section scroll) works on a
> single cell, not a row or column. Do cellRange->Select;
> app->ActiveWindow0>{FreezePanes} = 1;
FreezePanes can work on a row or column, if you
> Currently I'm using Spreadsheet::WriteExcel.
>
> I am trying to work out how to do the following...
>
> 1. Merge cells.
> 2. Make all columns AutoFit, after the data has been entered.
> 3. Freeze panes.
I don't use Spreadsheet::WriteExcel but if you can use W
> Nathaniel,
>
> I also use the OLE and I think you showed me how to freeze panes long
> ago. Anyways, the problem that I ran into using that command was: If the
> pane has already been frozen when you execute the same command, you get
> fatal error. So, do you know of a way to wrap a test around t
> Hi Nathaniel,
>
> Thanks for that, it's very helpful. I'm now trying to switch from
> Spreadsheet::WriteExcel, to Win32::OLE.
>
> The biggest problem I seem to have now is translating this command:
>
> my $temp = [EMAIL PROTECTED];
> $page}->write_row($row, 5, $temp);
>
> Can you help?
I don't k
Replace:
my $slideobject->$p2->Slides(1);
with:
my $slideobject = $p2->Slides(1);
--
Nathaniel Bartusiak
TTMS, Keesler AFB
> Hello,
>
> I am trying to add autoshapes to an embedding Excel slide. The VBA code I
> have works so I should only need to make a few modification
> Hello
> In Perl, I need to convert a color use by a cell in Excel to a RGB color.
>
> $indexcolor=$Book->Worksheets("example")->Range("A1")->Characters->Font->ColorIndex;
>
>
> How to convert the $indexcolor (which is a long) to ($r,$g,$b) ?
>
> Someone know how to do it ?
Actually I think
Try this:
my $from = $msg->{SenderName};
You can find other properties that are available in the Object Browser in the
Visual Basic Editor. You can get to the editor from Outlook under the Tools-
>Marco menu.
Nathaniel Bartusiak
TTMS, Keesler AFB
Quoting Julie Byrum <[EMAIL PROTECTED]>:
> I
Quoting just me <[EMAIL PROTECTED]>:
> .
> $msword->{Visible} = 1 ;
> $msword->{DisplayAlerts} = 1 ;
> my $doc1 = $msword->Documents->Add() ;
> $doc1->Shapes->AddPicture("D:\logo.gif",0,1);
>
> ...
>
> The picture doesn't show up in the word doc.
> Is this the correct wh
17 matches
Mail list logo