Hi
It seems to me that this property is set only once in first paragraph and later is not updated.If that assumption is correct, you might want to store the font-information to a variable outside of the loop and access it inside in case it is not redefined there. Something like:
HTH, Ratamy $oldFont; # variable to hold the current font while(defined(my $paragraph = $enumerate->Next())) { my $text = $paragraph->{Range}->{Text}; my $sel = $Word->Selection; my $font = $sel->Font; if (!defined($font)) { $font = $oldFont; } # use the old f +ont instead else { $oldFont = $font; } # use this font + for future paragraphs
In reply to Re: win 32 OLE Selection property
by Ratazong
in thread win 32 OLE Selection property
by wakatana
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |