home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 March
/
Chip_2002-03_cd1.bin
/
internet
/
jakpsat
/
archiv
/
makro_html.txt
< prev
next >
Wrap
Text File
|
2001-07-27
|
9KB
|
154 lines
Sub MAIN
REM Makro na p°evod wordovsk²ch dokument∙ do formßtu Html
REM funguje pouze ve Wordu verze 7, to jest 95
REM verze makra 1.3
REM ⌐ DuÜan Janovsk² 1998.
REM tento dokument je mo₧no Üφ°it beze zm∞n jako freeware.
REM Podporuje tuΦnost, kurzivu, odstavce typu normßlnφ, nadpis 1 a₧ 4
REM koncovß Φßst dokumentu je zapoznßmkovanß, proto₧e nefunguje dob°e.
REM upravuji konce odstavc∙ tak, aby p°ed ka₧d²m byla mezera, ale ne dv∞.
EditReplace .Find = "^p", .Replace = " ^p", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
EditReplace .Find = " ^p", .Replace = " ^p", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
REM zde se bude formßtovat tuΦnost a kurzφva
REM Kurzφva
EditFindStyle .Style = "Normßlnφ"
EditFindFont .Points = "", .Underline = - 1, .Color = - 1, .Strikethrough = - 1, .Superscript = - 1, .Subscript = - 1, .Hidden = - 1, .SmallCaps = - 1, .AllCaps = - 1, .Spacing = "", .Position = "", .Kerning = - 1, .KerningMin = "", .Tab = "0", .Font = "(normßlnφ text)", .Bold = - 1, .Italic = 1, .Outline = - 1, .Shadow = - 1
EditReplace .Find = "", .Replace = "<i>^&</i>", .Direction = 0, .MatchCase = 0, .WholeWord = 1, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 1, .Wrap = 1, .FindAllWordForms = 0
EditReplace .Find = " ^? ", .Replace = "<i>^&</i>", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 1, .Wrap = 1, .FindAllWordForms = 0
REM toto byla zatφm jen celß slova
REM Tohle jsou teΦky a Φßrky
EditReplace .Find = "i>^? ", .Replace = "i><^&</i>", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
REM vyt°φskßme zbyteΦnΘ </i> <i>
EditReplace .Find = "</i> <i>", .Replace = " ", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
EditReplace .Find = "</i><i>", .Replace = "", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
EditFindClearFormatting
REM TuΦnost
EditFindStyle .Style = "Normßlnφ"
EditFindFont .Points = "", .Underline = - 1, .Color = - 1, .Strikethrough = - 1, .Superscript = - 1, .Subscript = - 1, .Hidden = - 1, .SmallCaps = - 1, .AllCaps = - 1, .Spacing = "", .Position = "", .Kerning = - 1, .KerningMin = "", .Tab = "0", .Font = "(normßlnφ text)", .Bold = 1, .Italic = - 1, .Outline = - 1, .Shadow = - 1
EditReplace .Find = "", .Replace = "<b>^&</b>", .Direction = 0, .MatchCase = 0, .WholeWord = 1, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 1, .Wrap = 1, .FindAllWordForms = 0
EditReplace .Find = " ^? ", .Replace = "<b>^&</b>", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 1, .Wrap = 1, .FindAllWordForms = 0
REM toto byla zatφm jen celß slova
REM Tohle jsou teΦky a Φßrky
EditReplace .Find = "b>^? ", .Replace = "b><^&</b>", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 1, .Wrap = 1, .FindAllWordForms = 0
REM nesmφ to ale b²t >
EditReplace .Find = "<b>> </b>", .Replace = "> ", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
REM vyt°φskßme zbyteΦnΘ </b> <b>
EditReplace .Find = "</b> <b>", .Replace = " ", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
EditReplace .Find = "</b><b>", .Replace = "", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
EditFindClearFormatting
EditReplace .Find = "<b>i</b>>", .Replace = "i>", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
REM jen tak pro krßsu:
EditReplace .Find = "</b> <i><b>", .Replace = " <i>", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
EditReplace .Find = "</b></i> <b>", .Replace = "</i> ", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
REM zde konΦφ tuΦnost a kurzφva
REM Vyt°φskßme mezeroentry
EditReplace .Find = " ^p", .Replace = "^p", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
REM Zde zaΦφnß formfßtovßnφ odstavc∙
EditReplace .Find = "^l", .Replace = "<br>", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
EditFindStyle .Style = "Nadpis 1"
EditReplaceStyle .Style = "Nadpis 1"
EditReplace .Find = "", .Replace = "<h1>^&", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 1, .Wrap = 1, .FindAllWordForms = 0
EditFindStyle .Style = "Nadpis 1"
EditReplaceStyle .Style = "Nadpis 1"
EditReplace .Find = "^p", .Replace = "</h1>^p", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 1, .Wrap = 1, .FindAllWordForms = 0
EditFindStyle .Style = "Normßlnφ"
EditReplaceStyle .Style = "Normßlnφ"
EditReplace .Find = "", .Replace = "<p>^&", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 1, .Wrap = 1, .FindAllWordForms = 0
EditFindStyle .Style = "Normßlnφ"
EditReplaceStyle .Style = "Normßlnφ"
EditReplace .Find = "^p", .Replace = "</p>^p", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 1, .Wrap = 1, .FindAllWordForms = 0
EditFindStyle .Style = "Nadpis 4"
EditReplaceStyle .Style = "Nadpis 4"
EditReplace .Find = "", .Replace = "<h4>^&", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 1, .Wrap = 1, .FindAllWordForms = 0
EditFindStyle .Style = "Nadpis 4"
EditReplaceStyle .Style = "Nadpis 4"
EditReplace .Find = "^p", .Replace = "</h4>^p", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 1, .Wrap = 1, .FindAllWordForms = 0
EditFindStyle .Style = "Nadpis 3"
EditReplaceStyle .Style = "Nadpis 3"
EditReplace .Find = "", .Replace = "<h3>^&", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 1, .Wrap = 1, .FindAllWordForms = 0
EditFindStyle .Style = "Nadpis 3"
EditReplaceStyle .Style = "Nadpis 3"
EditReplace .Find = "^p", .Replace = "</h3>^p", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 1, .Wrap = 1, .FindAllWordForms = 0
EditFindStyle .Style = "Nadpis 2"
EditReplaceStyle .Style = "Nadpis 2"
EditReplace .Find = "", .Replace = "<h2>^&", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 1, .Wrap = 1, .FindAllWordForms = 0
EditFindStyle .Style = "Nadpis 2"
EditReplaceStyle .Style = "Nadpis 2"
EditReplace .Find = "^p", .Replace = "</h2>^p", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 1, .Wrap = 1, .FindAllWordForms = 0
REM Zde konΦφ formßtovßnφ odstavc∙, budou p°evedeny na normßlnφ styl
EditSelectAll
DemoteToBodyText
REM Zde zaΦφnß vklßdßnφ hlaviΦky
REM
REM
REM StartOfDocument
REM
REM Insert "<HTML>"
REM InsertPara
REM Insert "<HEAD> "
REM InsertPara
REM Insert "<META HTTP-EQUIV =≈Content-Type≈ CONTENT=≈Text/html; charset=windows-1250≈ > "
REM InsertPara
REM Insert "<META Name=≈Generator≈ CONTENT=≈Genial Yuhu Word Makro≈ > "
REM InsertPara
REM Insert "<TITLE > "
REM InsertField .Field = "N┴ZEV"
REM Insert "</TITLE>"
REM InsertPara
REM Insert "</HEAD> "
REM InsertPara
REM Insert "<body stylesrc=≈Pom.htm≈>"
REM InsertPara
REM
REM EndOfDocument
REM Insert "</html>"
REM
REM Zde konΦφ vklßdßnφ hlaviΦky
REM
REM EditFindClearFormatting
REM EditReplaceClearFormatting
REM EditReplace .Find = "≈", .Replace = Chr$(34), .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 1, .Wrap = 1, .FindAllWordForms = 0
REM Toto bylo trivißlnφ p°ek≤dovßnφ uvozovek
REM !!!! -------------------- Vklßdßnφ hlaviΦky nefunguje sprßvn∞ -------------------
REM Zde se uklßdß soubor jako HTML.TXT
REM FileSaveAs .Name = "html.txt", .Format = 2, .LockAnnot = 0, .Password = "", .AddToMru = 1, .WritePassword = "", .RecommendReadOnly = 0, .EmbedFonts = 0, .NativePictureFormat = 0, .FormsData = 0, .SaveAsAOCELetter = 0
REM zde konΦφ uklßdßnφ souboru. Je nutnΘ jej p°ejmenovat.
REM Nynφ se soubor uzav°e, aby dßle nemßtl.
REM DocClose
End Sub