Ask a Question related to PERL Modules, Design and Development.
-
Alfredo #1
Win32::OLE and Word
I'm using Perl to automate the creation/manipulation of Word documents.
I'm doing fine other than adding tabs. I recorded the following macro
information for reference:
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(1),
_
Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(4),
_
Alignment:=wdAlignTabLeft, Leader:=wdTabLeaderSpaces
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(5),
_
Alignment:=wdAlignTabCenter, Leader:=wdTabLeaderSpaces
I'm trying to get that translated to Perl. Any help you can provide
would be greatly appreciated.
I did find the following code online, but it doesn't seem to work:
$doc = $word->Documents->Add;
$selection = $word->Selection;
$selection->ParagraphFormat->{TabStops}->Add($word->InchesToPoints(4));
Alfredo Guest
-
Dave Roth's site (Win32::AdminMisc, Win32::ODBC, etc.) not available.
Does anyone know of an alternate method to contact Dave Roth (other then rothd@roth.net )? It appears that his entire domain is unavailable... -
Getting Word Count from MS Word files
I would like to get the word count of MS Word files. I found a CFX tag on the exchange: CFX_FileSummary, but the download page is a dead link, as... -
Win32-PerfMon on Win32
Windows 2000(SP4) ActivePerl 5.8.3 I found this escapade rather confusing, I'm warning you now. I cannot install this Win32-PerfMon module, I... -
Preventing MS Word Footers being used in word to pdf conversion
Is it possible to stop Adobe PDF 6.0 pro from importing the page headers and/or footers on a batch of Word documents when converting the docuements... -
Editing Word documents in Perl (Openoffice Writer or MS Word)
Hello, I want to read and edit openoffice / staroffice writer documents. Does anyone know of any modules for that? Ideally, I would've liked a... -
Greg M Brown #2
Re: Win32::OLE and Word
Alfredo,
You found something close enough that I ended up guessing the rest of the solution. Try this:
$selection = $word->Selection;
$selection->ParagraphFormat->{Alignment} = wdAlignTabLeft;
$selection->ParagraphFormat->{Alignment} = wdAlignTabCenter;
$selection->ParagraphFormat->{Alignment} = wdAlignTabRight;
This worked for me. I hope it works as well for you.
- Greg
Junior Member
- Join Date
- Nov 2010
- Posts
- 1



Reply With Quote

