Skip to Content.
Sympa Menu

b-hebrew - Re: OTA BHS conversion to Word 2000

b-hebrew AT lists.ibiblio.org

Subject: Biblical Hebrew Forum

List archive

Chronological Thread  
  • From: "John Richards" <jhr AT universalist.worldonline.co.uk>
  • To: "Peter Kirk" <Peter_Kirk AT sil.org>, "Biblical Hebrew" <b-hebrew AT franklin.oit.unc.edu>
  • Subject: Re: OTA BHS conversion to Word 2000
  • Date: Wed, 22 Nov 2000 19:39:39 -0000


From: "Peter Kirk" <Peter_Kirk AT sil.org>
To: "Biblical Hebrew" <b-hebrew AT franklin.oit.unc.edu>
Sent: Wednesday, November 22, 2000 7:14 PM
Subject: RE: OTA BHS conversion to Word 2000


> I would strongly discourage adding anything like this to your normal.dot
> template. Certainly don't do so unless you 100% trust the person who sent
> you the macro - in this case John Richards. This macro could contain a
virus
> or "Trojan horse" program, which could then infect all of your document
> files or trash your system in many other ways.

I stand corrected! - and I agree with what Peter says wholeheartedly. It was
unwise of me to offer the macro in that form. I have never had a virus yet
(to my knowledge) in more than 15 years of computing - but there is always a
first time.

May I suggest therefore that anyone interested simply creates a macro and
copies in the following lines. Note that when you create a macro the first
and last lines are created automatically. You do not want them twice, but I
wanted to show the full code. Putting it printed out like this rather
highlights that it is a very "cobbled" macro! - originally written in Word
6, and largely just ported across - as the large number of

WordBasic.

starts to lines gives away immediately. But it does work quite effectively.

Once again, I am pretty sure I have no viruses (I only access very
"responsible" parts of the Internet) - but one can never be too careful.
Thank you for reminding us.

John Richards


**************************************************
Sub MAIN()
' OTABHS
' JHR 21/11/00
' a macro to format the converted OTA BHS
' in Word 2000

' Dim x
' Dim y

' Names of books
Dim Book$(39)
Book$(1) = "Genesis"
Book$(2) = "Exodus"
Book$(3) = "Leviticus"
Book$(4) = "Numbers"
Book$(5) = "Deuteronomy"
Book$(6) = "Joshua"
Book$(7) = "Judges"
Book$(8) = "1 Samuel"
Book$(9) = "2 Samuel"
Book$(10) = "1 Kings"
Book$(11) = "2 Kings"
Book$(12) = "Isaiah"
Book$(13) = "Jeremiah"
Book$(14) = "Ezekiel"
Book$(15) = "Hosea"
Book$(16) = "Joel"
Book$(17) = "Amos"
Book$(18) = "Obadiah"
Book$(19) = "Jonah"
Book$(20) = "Micah"
Book$(21) = "Nahum"
Book$(22) = "Habakkuk"
Book$(23) = "Zephaniah"
Book$(24) = "Haggai"
Book$(25) = "Zachariah"
Book$(26) = "Malachi"
Book$(27) = "Psalm"
Book$(28) = "Job"
Book$(29) = "Proverbs"
Book$(30) = "Ruth"
Book$(31) = "Song of Songs"
Book$(32) = "Ecclesiastes"
Book$(33) = "Lamentations"
Book$(34) = "Esther"
Book$(35) = "Daniel"
Book$(36) = "Ezra"
Book$(37) = "Nehemiah"
Book$(38) = "1 Chronicles"
Book$(39) = "2 Chronicles"

' Number of chapters in each book
Dim chapter(39)
chapter(1) = 50
chapter(2) = 40
chapter(3) = 27
chapter(4) = 36
chapter(5) = 34
chapter(6) = 24
chapter(7) = 21
chapter(8) = 31
chapter(9) = 24
chapter(10) = 22
chapter(11) = 25
chapter(12) = 66
chapter(13) = 52
chapter(14) = 48
chapter(15) = 14
chapter(16) = 4
chapter(17) = 9
chapter(18) = 1
chapter(19) = 4
chapter(20) = 7
chapter(21) = 3
chapter(22) = 3
chapter(23) = 3
chapter(24) = 2
chapter(25) = 14
chapter(26) = 3
chapter(27) = 150
chapter(28) = 42
chapter(29) = 31
chapter(30) = 4
chapter(31) = 8
chapter(32) = 12
chapter(33) = 5
chapter(34) = 10
chapter(35) = 12
chapter(36) = 10
chapter(37) = 13
chapter(38) = 29
chapter(39) = 36

' Remove irregular number of surplus right margin spaces
For x = 0 To 4
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = " ^p"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Next x
WordBasic.StartOfDocument

' Remove existing garbled Book Headings
WordBasic.InsertPara
WordBasic.LineUp 1
For x = 1 To 39
WordBasic.EditFind Find:="^p1 retpahC", Direction:=0, MatchCase:=0,
WholeWord:=0, PatternMatch:=0, SoundsLike:=0, Format:=0, Wrap:=2
WordBasic.CharLeft 1
WordBasic.LineDown 1
WordBasic.StartOfLine
WordBasic.LineUp 4
WordBasic.ParaDown 4, 1
WordBasic.InsertPara
WordBasic.EndOfLine
WordBasic.LineDown 1
Next x
WordBasic.StartOfDocument

' Insert spaces between chapter
For x = 0 To 928
WordBasic.EditFind Find:="retpahC", Direction:=0, MatchCase:=0,
WholeWord:=0, PatternMatch:=0, SoundsLike:=0, Format:=0, Wrap:=2
WordBasic.StartOfLine
WordBasic.InsertPara
WordBasic.LineDown 2
Next x
WordBasic.StartOfDocument

' Make sure there is only one space between chapter
For x = 0 To 3
WordBasic.EditReplace Find:="^p^p^p", Replace:="^p^p", Direction:=0,
MatchCase:=0, WholeWord:=0, PatternMatch:=0, SoundsLike:=0, ReplaceAll:=1,
Format:=0, Wrap:=2
Next x
WordBasic.StartOfDocument

' Remove all cases of "retpahC"
WordBasic.EditReplace Find:="retpahC", Replace:="", Direction:=0,
MatchCase:=0, WholeWord:=0, PatternMatch:=0, SoundsLike:=0, ReplaceAll:=1,
Format:=0, Wrap:=2
WordBasic.StartOfDocument

' Convert to SIL font and right alignment
Selection.WholeStory
Selection.Font.Name = "SIL Ezra"
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
Selection.HomeKey Unit:=wdStory

' Insert Chapter headings
For y = 1 To 39
For x = 1 To chapter(y)
WordBasic.EditFind Find:="^p^p", Direction:=0, MatchCase:=0, WholeWord:=0,
PatternMatch:=0, SoundsLike:=0, Format:=0, Wrap:=1
WordBasic.LineDown 1
WordBasic.StartOfLine
WordBasic.Insert " "
WordBasic.StartOfLine
WordBasic.Insert Book$(y)
WordBasic.StartOfLine
WordBasic.WordRight 1, 1
WordBasic.ParaDown 1, 1
WordBasic.Font "Times New Roman"
WordBasic.EndOfLine
WordBasic.LineDown 1
Next x
Next y

WordBasic.StartOfDocument

End Sub






Archive powered by MHonArc 2.6.24.

Top of Page