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 = "^&", .Direction = 0, .MatchCase = 0, .WholeWord = 1, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 1, .Wrap = 1, .FindAllWordForms = 0
EditReplace .Find = " ^? ", .Replace = "^&", .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><^&", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
REM vytřískáme zbytečné
EditReplace .Find = " ", .Replace = " ", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
EditReplace .Find = "", .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 = "^&", .Direction = 0, .MatchCase = 0, .WholeWord = 1, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 1, .Wrap = 1, .FindAllWordForms = 0
EditReplace .Find = " ^? ", .Replace = "^&", .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><^&", .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 = "> ", .Replace = "> ", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
REM vytřískáme zbytečné
EditReplace .Find = " ", .Replace = " ", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
EditReplace .Find = "", .Replace = "", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
EditFindClearFormatting
EditReplace .Find = "i>", .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 = " ", .Replace = " ", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0
EditReplace .Find = " ", .Replace = " ", .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 = "
", .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 = "
^&", .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", .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 = "