in reply to Set font size in Words document
Let me know if you have any problems.#!/usr/bin/perl use strict; use warnings; use Win32::OLE; use Win32::OLE::Const 'Microsoft Word'; my $file_name = "c:\\temp.doc"; my $Word = Win32::OLE->new('Word.Application'); $Word->{'Visible'} = 1; my $document = $Word->Documents->Open($file_name) || die("Unable to op +en document", Win32::OLE->LastError()); my $Selection = $Word->Selection; $Selection->WholeStory; $Selection->Font->{'Size'} = '9'; $Word->Documents($file_name)->Save(); $Word->Quit();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Set font size in Words document
by sungy (Initiate) on Mar 14, 2006 at 21:20 UTC |