Re: error when I try to execute the "SaveAs" function in Win32::OLE" when I try to save an Excel worksheet to a new format.

2006-10-04 Thread work
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

Re: Win32::OLE & MS Word

2002-09-17 Thread work
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} =

Re: Dividing a Word Document into Columns

2003-01-03 Thread work
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 "

Re: Dividing a Word Document into Columns

2003-01-03 Thread work
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 "

Re: Search and replace in msword .doc

2003-01-28 Thread work
place = $search->Replacement; > > $search->{Text} = "searched"; > $replace->{Text} = "replace"; > $search->Execute({Replace => wdReplaceAll}); > > $doc -> Close(); > $word -> Quit(); > > - > > > > B

Re: inserting text into word with OLE

2003-01-28 Thread work
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,

Re: Excel Cell Value Alignment

2003-07-11 Thread work
> 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

Re: win32::ole open, copy&paste, create new, save document

2003-07-25 Thread work
> 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

Re: Read entire row from excel into hash.

2003-08-14 Thread work
> 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

Re: How do I measure text length? (+ How to measure page-width)

2003-09-04 Thread work
> 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

Re: Excel stuff.

2003-11-20 Thread work
> 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

RE: Excel stuff.

2003-11-20 Thread work
> 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

RE: Excel stuff.

2003-11-20 Thread work
> 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

Re: Win32 PPT Adding Autoshapes

2004-01-07 Thread work
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

Re: Excel color to RGB

2004-01-19 Thread work
> 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

Re: Accessing Outlook Items

2004-04-27 Thread work
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

Re: insert picture in Word using Perl OLE

2004-10-18 Thread work
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