in reply to Re^2: Using OLE to view given Paragraph in MS Word Document
in thread Using OLE to view given Paragraph in MS Word Document
I don't really understand what you want to do!
If you need to view the paragraphs being selected you could add the following:
for my $i ( 1 .. $paragraphs->Count()){ last if $i > $ParaNo; $paragraph = $paragraphs->Item( $i ); $paragraph->{Range}->Select(); # <<<<<Added sleep(1); # <<<<<Added my $style = $paragraph->{Style}->{NameLocal}; my $text = $paragraph->{Range}->{Text}; print "style=$style text=$text\n"; }
I have used placed the sleep in the loop so that you can see the paragraphs being selected in turn, otherwise it would just happen too quickly - especially since you are only interested in the first 10 paragraphs!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Using OLE to view given Paragraph in MS Word Document
by Ray Smith (Beadle) on Nov 22, 2011 at 15:53 UTC | |
by ricDeez (Scribe) on Nov 22, 2011 at 20:47 UTC |