Ocenite etot tekst:




 From: Goff 

     Makros  pomechaet vse vydeleniya kursivom i boldom HTML-nymi
tagami Pri sohranenii v "Text only" vordovaya okraska sohranitsya
kak html-naya okraska.  YA ne znayu, mozhno li stavit' perekrestnye
tagi v tekste, ya imeyu vvidu konstrukciyu:

nnnnnnnbbbbbbbbbbibibibiibibbibiiiiiiiiiiiiiinnnnn,

po krainej mere, esli eto ne dopustimo, to daj znat', peredelayu

Sub MAIN
StartOfDocument
BOLDCHECK:
If AtEndOfDocument() = - 1 Then Goto ENDBOLD
If Bold() = 1 Then CharLeft : Insert "" : CharRight : Goto BOLDMODE
CharRight
Goto BOLDCHECK
BOLDMODE:
If AtEndOfDocument() = - 1 Then Insert "" : Goto ENDBOLD
If Bold() = 0 Then CharLeft : Insert "" : CharRight : Goto BOLDCHECK
CharRight
Goto BOLDMODE
ENDBOLD:
StartOfDocument
ITALCHECK:
If AtEndOfDocument() = - 1 Then Goto ENDITAL
If Italic() = 1 Then CharLeft : Insert "" : CharRight : Goto ITALMODE
CharRight
Goto ITALCHECK
ITALMODE:
If AtEndOfDocument() = - 1 Then Insert "" : Goto ENDITAL
If Italic() = 0 Then CharLeft : Insert "" : CharRight : Goto ITALCHECK
CharRight
Goto ITALMODE
ENDITAL:
StartOfDocument
UNDCHECK:
If AtEndOfDocument() = - 1 Then Goto ENDUND
If Underline() = 1 Then CharLeft : Insert "" : CharRight : Goto UNDMODE
CharRight
Goto UNDCHECK
UNDMODE:
If AtEndOfDocument() = - 1 Insert "" : Then Goto ENDUND
If Underline() = 0 Then CharLeft : Insert "" : CharRight : Goto UNDCHECK
CharRight
Goto UNDMODE
ENDUND:
End Sub

    Formated ascii --> Word

From: Goff To: moshkow@ipwsun.ras.ru YA rabotayu v gazete, delayu verstku, i kogda nadoelo vnosit' odnu i tuzhe pravku v ogromnyh kolichestvah, sdelal tri makrosa dlya Worda. Dumayu, prigodyatsya, u nas oni zdorovo oblegchayut rabotu po podgotovke tekstov k pechati. Arhiv txtmacro.zip soderzhit M Filemode Length Date Time File - ---------- -------- ----------- -------- ----------- -rw-r--r-- 13061 29-Jan-1998 07:49:08 readme.txt -rw-r--r-- 39424 29-Jan-1998 07:48:30 normal.dot -rw-r--r-- 21504 29-Jan-1998 07:53:12 general.doc - ---------- -------- ----------- -------- ----------- 73989 3 files V fajle normal.dot est' tri makrosa, oni vyvedeny v menyu "servis" reformat rtf - etot ubiraet pribambasy posle skanirovaniya teksta FineReader'om, konvertiruya frejmy i prochuyu fignyu v "ploskij" tekst, no s sohraneniem tablic i paragrafov. reformat txt - etot sbivaet znak abzaca v konce kazhdoj stroki, a dvazhdy povtorennyj znak abzaca menyaet na odin. I samyj pol'zitel'nyj dlya navedeniya krasoty, on zhe povtoren v tekstovom fajle - reformat general - delaet mnogo chego, naprimer, ubiraet sdvoennye probely, ubiraet probely pered tochkami, posle otkryvayushchih skobok, zamenyaet korotkie tire na chelovecheskie dlinnye, nu i tak dalee. Tekst posle etogo reformata vyglyadit pochti bezuprechno. V konce makrosa est' dva vlozhennyh cikla, ubirayushchih nenuzhnye probely posle tochek, zapyatyh i dvoetochij v datah, drobnyh chislah i t.d. Oni zdorovo udlinyayut vremya raboty makrosa, poetomu, esli eti ostavshiesya v chislennyh probely menee kritichny chem vremya, to ih mozhno udalit'. skrolling "tuda-syuda" dokumenta v konce - vsego lish' znak o normal'nom okonchanii raboty makrosa. !!! makros sohranyaet reformatirovannyj dokument bez zaprosa i srazu zhe zakryvaet ego !!! S nailuchshimi pozhelaniyami, nadeyus', chto prigoditsya.

    General.macro

Sub MAIN StartOfDocument 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 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 EditReplace .Find = "^p-", .Replace = "^p- ", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 EditReplace .Find = " " + Chr$(34), .Replace = " " + Chr$(171), .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 EditReplace .Find = "^p" + Chr$(34), .Replace = "^p" + Chr$(171), .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 EditReplace .Find = "-" + Chr$(34), .Replace = "- " + Chr$(171), .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 EditReplace .Find = Chr$(34) + " ", .Replace = Chr$(187) + " ", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 EditReplace .Find = Chr$(34) + ".", .Replace = Chr$(187) + ".", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 EditReplace .Find = Chr$(34) + ",", .Replace = Chr$(187) + ",", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 EditReplace .Find = Chr$(34) + "-", .Replace = Chr$(187) + " - ", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 EditReplace .Find = Chr$(34) + "^p", .Replace = Chr$(187) + "^p", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 EditReplace .Find = "(" + Chr$(34), .Replace = "(" + Chr$(171), .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 EditReplace .Find = Chr$(34) + ")", .Replace = Chr$(187) + ")", .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 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 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 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 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 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 EditReplace .Find = ",", .Replace = ", ", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 For K = 1 To 10 EditReplace .Find = " ", .Replace = " ", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 Next K For L = 1 To 4 EditReplace .Find = ". .", .Replace = "..", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 Next L 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 EditReplace .Find = " ped.", .Replace = " Ped.", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 EditReplace .Find = "-ped.", .Replace = "- Ped.", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 EditReplace .Find = ". " + Chr$(187), .Replace = Chr$(187) + ".", .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 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 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 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 EditReplace .Find = " %", .Replace = "%", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 EditReplace .Find = ".." + Chr$(187) + ".", .Replace = "..." + Chr$(187), .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 EditReplace .Find = "„", .Replace = Chr$(171), .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 EditReplace .Find = Chr$(148), .Replace = Chr$(171), .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 EditReplace .Find = Chr$(147), .Replace = Chr$(187), .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 For n = 48 To 57 For m = 48 To 57 EditReplace .Find = Chr$(n) + ". " + Chr$(m), .Replace = Chr$(n) + "." + Chr$(m), .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 EditReplace .Find = Chr$(n) + ", " + Chr$(m), .Replace = Chr$(n) + "," + Chr$(m), .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 EditReplace .Find = Chr$(n) + ": " + Chr$(m), .Replace = Chr$(n) + ":" + Chr$(m), .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .ReplaceAll, .Format = 0, .Wrap = 1, .FindAllWordForms = 0 Next m Next n VLine 31 VLine - 31 FileSave FileClose End Sub

Last-modified: Thu, 29 Jan 1998 04:59:11 GMT
Ocenite etot tekst: