### PERL SCRIPTSub yadda() ' ' yaddaMacro ' Macro recorded 23/11/2004 by Richard Barrett-Small ' With Options .LocalNetworkFile = False .AllowFastSave = True .BackgroundSave = True .CreateBackup = False .SavePropertiesPrompt = False .SaveInterval = 10 .SaveNormalPrompt = False .DisableFeaturesbyDefault = False End With With ActiveDocument .ReadOnlyRecommended = False .EmbedTrueTypeFonts = False .SaveFormsData = False .SaveSubsetFonts = False .DoNotEmbedSystemFonts = True .Password = "" .WritePassword = "" .DisableFeatures = False .EmbedSmartTags = False .SmartTagsAsXMLProps = False .EmbedLinguisticData = True End With Application.DefaultSaveFormat = "" With autocorrect .CorrectInitialCaps = True .CorrectSentenceCaps = True .CorrectDays = True .CorrectCapsLock = True .ReplaceText = True .ReplaceTextFromSpellingChecker = True .CorrectKeyboardSetting = False .DisplayAutoCorrectOptions = True .CorrectTableCells = True End With With Options .LabelSmartTags = False .DisplaySmartTagButtons = True End With End Sub
#!C:\Perl\bin\perl5.8.4.exe use strict; use Win32::OLE; use Win32::OLE::Const 'Microsoft Word'; system("set PERL5OPT=-MWild"); my $file = $ARGV[0] or die "Perl says: $!\n\nThis means:\nSyntax is...\n\tpq_jnl_conv.pl filename(s)\n"; my $Word = Win32::OLE->new('Word.Application', 'Quit'); while ( $file = shift) { print "$file.html\n"; # $Word->{'Visible'} = 1; # if you want to see what's going on $Word->Documents->Open("$file") || die("Unable to open document $file\ +n", Win32::OLE->LastError()); $Word->ActiveDocument->SaveAs ( { FileName => "$file.html", FileFormat => FormatHTML } ); }
In reply to Win32::OLE Word Macro Conversion by offspinner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |