Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Converting BW-Greek in documents to the new SBL Greek font - how?

  1. #11
    Join Date
    Apr 2004
    Posts
    537

    Default Font conversion macro in BibleWorks

    There is a font conversion BW font to Unicode font contained in the BW8 Help file, chapter 59. The macros are also included in unimacros.txt in the main BibleWorks program directory. You will have to copy the text of macros, then open the Word Macro editor and paste the macros into the Word Macro editor. Then run the macros.

    We haven't had a lot of feedback on them, so make sure that you make a backup copy of your document before you run the macros. You can change the font names in the macro to convert directly to SBL Greek and SBL Hebrew, if you wish.
    Glenn Weaver

    For technical support, please contact Customer Support.

  2. #12

    Default

    Quote Originally Posted by Glenn Weaver View Post
    There is a font conversion BW font to Unicode font contained in the BW8 Help file, chapter 59. The macros are also included in unimacros.txt in the main BibleWorks program directory.
    Would it be possible for these macros to be made available apart from BW8? I have BW7, and a fair heap of Word files that I would love to be able to run a Bwhebb > Unicode macro on. Or is it already out there somewhere and I've missed it?

    And if it isn't "out there" yet ... pretty please?

  3. #13
    Join Date
    Apr 2004
    Posts
    181

    Default Unicode conversion

    BW8 Help chapter 59 is very similar to BW7 Help chapter 46. I think you'll find what you need there.

  4. #14

    Default

    Quote Originally Posted by Greg Ward View Post
    BW8 Help chapter 59 is very similar to BW7 Help chapter 46. I think you'll find what you need there.
    I have indeed! Many thanks for this, Greg -- you've made me feel a little bit like Cyrus (cf. Isa 45:3)!

    Update: I just tried this out, and for the record, the macros (well, ConvertAllBwHeb2Unicode anyway! the one I'm most interested in) worked beautifully, from the BW7 help file, using Word 2002 (!). So that's good news, then.
    Last edited by doc_dave; 06-15-2009 at 07:23 AM. Reason: update

  5. #15
    Join Date
    Apr 2009
    Posts
    1

    Default

    Sorry to revive an old thread but...I am trying to convert bwhebb font to SBL Hebrew using the unimacros.txt. I replaced Ezra SIL with SBL Hebrew. However it isn't playing nice with Word 2007 and the Hebrew font is garbled. Can anyone help modify the macro. The macro text is below
    As an aside, it works perfectly with Greek - only struggling with Hebrew.
    Thanks.

    Sub ConvertBwHeb2Unicode(fromfont$, tofont$, doentirefile)
    Dim o As Object
    Dim ucstr As Variant
    ReDim ucstr(1024) As Long
    If (doentirefile = True) Then Selection.HomeKey Unit:=wdStory
    Set o = CreateObject("bwcom.document")
    Application.ScreenUpdating = True
    icheck = 0
    While (icheck = 0)
    Selection.Find.ClearFormatting
    With Selection.Find
    .Font.Name = fromfont$
    .Text = ""
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchKashida = False
    .MatchDiacritics = False
    .MatchAlefHamza = False
    .MatchControl = False
    .MatchByte = False
    .CorrectHangulEndings = False
    .MatchAllWordForms = False
    .MatchSoundsLike = False
    .MatchWildcards = False
    .MatchFuzzy = False
    End With
    If (Selection.Find.Execute = False) Then
    icheck = 1
    Else
    istart = 1
    iend = Selection.Characters.Count
    ReDim ucstr(3 * iend + 2) As Long
    ucstr(1) = iend
    For i = istart To iend
    ucstr(i + 1) = Asc(Selection.Characters(i))
    Next i
    o.BwHebb2Unicode ucstr
    Selection.Delete
    Application.Keyboard (1037)
    With Selection.Font
    .NameFarEast = "SimSun"
    .NameAscii = "Arial"
    .NameOther = "Arial"
    .Name = "Arial"
    .Size = 10
    .Bold = False
    .Italic = False
    .Underline = wdUnderlineNone
    .UnderlineColor = wdColorAutomatic
    .StrikeThrough = False
    .DoubleStrikeThrough = False
    .Outline = False
    .Emboss = False
    .Shadow = False
    .Hidden = False
    .SmallCaps = False
    .AllCaps = False
    .Color = wdColorAutomatic
    .Engrave = False
    .Superscript = False
    .Subscript = False
    .Spacing = 0
    .Scaling = 100
    .Position = 0
    .Kerning = 0
    .Animation = wdAnimationNone
    .DisableCharacterSpaceGrid = False
    .EmphasisMark = wdEmphasisMarkNone
    .SizeBi = 14
    .NameBi = tofont$
    .BoldBi = False
    .ItalicBi = False
    End With
    For i = 1 To ucstr(1)
    s$ = ChrW(ucstr(i + 1))
    Selection.TypeText Text:=s$
    Next i
    Application.Keyboard (1033)
    End If
    If (doentirefile = False) Then icheck = 1
    Wend

    Application.ScreenUpdating = True
    Set bwutil = Nothing

    End Sub

    Sub ConvertBwGrk2Unicode(fromfont$, tofont$, doentirefile)
    Dim o As Object
    Dim ucstr As Variant
    ReDim ucstr(1024) As Long
    If (doentirefile = True) Then Selection.HomeKey Unit:=wdStory
    Set o = CreateObject("bwcom.document")
    icheck = 0
    While (icheck = 0)
    Selection.Find.ClearFormatting
    With Selection.Find
    .Font.Name = fromfont$
    .Text = ""
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchKashida = False
    .MatchDiacritics = False
    .MatchAlefHamza = False
    .MatchControl = False
    .MatchByte = False
    .CorrectHangulEndings = False
    .MatchAllWordForms = False
    .MatchSoundsLike = False
    .MatchWildcards = False
    .MatchFuzzy = False
    End With
    If (Selection.Find.Execute = False) Then
    icheck = 1
    Else
    istart = 1
    iend = Selection.Characters.Count
    ReDim ucstr(3 * iend + 2) As Long
    ucstr(1) = iend
    For i = istart To iend
    ucstr(i + 1) = Asc(Selection.Characters(i))
    Next i
    o.BwGrkl2Unicode ucstr
    Selection.Delete
    Application.Keyboard (1032)
    With Selection.Font
    .NameFarEast = "SimSun"
    .NameAscii = "Arial"
    .NameOther = "Arial"
    .Name = "Arial"
    .Size = 10
    .Bold = False
    .Italic = False
    .Underline = wdUnderlineNone
    .UnderlineColor = wdColorAutomatic
    .StrikeThrough = False
    .DoubleStrikeThrough = False
    .Outline = False
    .Emboss = False
    .Shadow = False
    .Hidden = False
    .SmallCaps = False
    .AllCaps = False
    .Color = wdColorAutomatic
    .Engrave = False
    .Superscript = False
    .Subscript = False
    .Spacing = 0
    .Scaling = 100
    .Position = 0
    .Kerning = 0
    .Animation = wdAnimationNone
    .DisableCharacterSpaceGrid = False
    .EmphasisMark = wdEmphasisMarkNone
    .SizeBi = 14
    .NameBi = tofont$
    .BoldBi = False
    .ItalicBi = False
    End With
    For i = 1 To ucstr(1)
    s$ = ChrW(ucstr(i + 1))
    Selection.TypeText Text:=s$
    Next i
    Application.Keyboard (1033)
    End If
    If (doentirefile = False) Then icheck = 1
    Wend
    Set bwutil = Nothing
    End Sub

    Sub ConvertBwSym2Unicode(fromfont$, tofont$, doentirefile)
    Dim o As Object
    Dim ucstr As Variant
    ReDim ucstr(1024) As Long
    If (doentirefile = True) Then Selection.HomeKey Unit:=wdStory
    Set o = CreateObject("bwcom.document")
    icheck = 0
    While (icheck = 0)
    Selection.Find.ClearFormatting
    With Selection.Find
    .Font.Name = fromfont$
    .Text = ""
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchKashida = False
    .MatchDiacritics = False
    .MatchAlefHamza = False
    .MatchControl = False
    .MatchByte = False
    .CorrectHangulEndings = False
    .MatchAllWordForms = False
    .MatchSoundsLike = False
    .MatchWildcards = False
    .MatchFuzzy = False
    End With
    If (Selection.Find.Execute = False) Then
    icheck = 1
    Else
    istart = 1
    iend = Selection.Characters.Count
    ReDim ucstr(3 * iend + 2) As Long
    ucstr(1) = iend
    For i = istart To iend
    ucstr(i + 1) = Asc(Selection.Characters(i))
    Next i
    o.BwSym2Unicode ucstr
    Selection.Delete
    Application.Keyboard (1033)
    With Selection.Font
    .NameFarEast = "SimSun"
    .NameAscii = tofont$
    .NameOther = tofont$
    .Name = tofont$
    .Size = 10
    .Bold = False
    .Italic = False
    .Underline = wdUnderlineNone
    .UnderlineColor = wdColorAutomatic
    .StrikeThrough = False
    .DoubleStrikeThrough = False
    .Outline = False
    .Emboss = False
    .Shadow = False
    .Hidden = False
    .SmallCaps = False
    .AllCaps = False
    .Color = wdColorAutomatic
    .Engrave = False
    .Superscript = False
    .Subscript = False
    .Spacing = 0
    .Scaling = 100
    .Position = 0
    .Kerning = 0
    .Animation = wdAnimationNone
    .DisableCharacterSpaceGrid = False
    .EmphasisMark = wdEmphasisMarkNone
    .SizeBi = 12
    .NameBi = tofont$
    .BoldBi = False
    .ItalicBi = False
    End With
    For i = 1 To ucstr(1)
    isetsuper = 0
    If (ucstr(i + 1) < 0) Then
    Selection.Font.Superscript = True
    isetsuper = 1
    s$ = ChrW(-ucstr(i + 1))
    ElseIf (ucstr(i + 1) > 0) Then
    s$ = ChrW(ucstr(i + 1))
    Else
    s$ = " "
    End If
    Selection.TypeText Text:=s$
    If (isetsuper = 1) Then Selection.Font.Superscript = False
    Next i
    Application.Keyboard (1033)
    End If
    If (doentirefile = False) Then icheck = 1
    Wend
    Application.ScreenUpdating = True
    Set bwutil = Nothing

    End Sub
    Sub ConvertBwLex2Unicode(fromfont$, tofont$, doentirefile)
    Dim o As Object
    Dim ucstr As Variant
    ReDim ucstr(1024) As Long
    If (doentirefile = True) Then Selection.HomeKey Unit:=wdStory
    Set o = CreateObject("bwcom.document")
    icheck = 0
    While (icheck = 0)
    Selection.Find.ClearFormatting
    With Selection.Find
    .Font.Name = fromfont$
    .Text = ""
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchKashida = False
    .MatchDiacritics = False
    .MatchAlefHamza = False
    .MatchControl = False
    .MatchByte = False
    .CorrectHangulEndings = False
    .MatchAllWordForms = False
    .MatchSoundsLike = False
    .MatchWildcards = False
    .MatchFuzzy = False
    End With
    If (Selection.Find.Execute = False) Then
    icheck = 1
    Else
    istart = 1
    iend = Selection.Characters.Count
    ReDim ucstr(3 * iend + 2) As Long
    ucstr(1) = iend
    For i = istart To iend
    ucstr(i + 1) = Asc(Selection.Characters(i))
    Next i
    o.BwLex2Unicode ucstr
    Selection.Delete
    Application.Keyboard (1033)
    With Selection.Font
    .NameFarEast = "SimSun"
    .NameAscii = tofont$
    .NameOther = tofont$
    .Name = tofont$
    .Size = 10
    .Bold = False
    .Italic = False
    .Underline = wdUnderlineNone
    .UnderlineColor = wdColorAutomatic
    .StrikeThrough = False
    .DoubleStrikeThrough = False
    .Outline = False
    .Emboss = False
    .Shadow = False
    .Hidden = False
    .SmallCaps = False
    .AllCaps = False
    .Color = wdColorAutomatic
    .Engrave = False
    .Superscript = False
    .Subscript = False
    .Spacing = 0
    .Scaling = 100
    .Position = 0
    .Kerning = 0
    .Animation = wdAnimationNone
    .DisableCharacterSpaceGrid = False
    .EmphasisMark = wdEmphasisMarkNone
    .SizeBi = 12
    .NameBi = tofont$
    .BoldBi = False
    .ItalicBi = False
    End With
    For i = 1 To ucstr(1)
    isetsuper = 0
    If (ucstr(i + 1) < 0) Then
    Selection.Font.Superscript = True
    isetsuper = 1
    s$ = ChrW(-ucstr(i + 1))
    ElseIf (ucstr(i + 1) > 0) Then
    s$ = ChrW(ucstr(i + 1))
    Else
    s$ = " "
    End If
    Selection.TypeText Text:=s$
    If (isetsuper = 1) Then Selection.Font.Superscript = False
    Next i
    Application.Keyboard (1033)
    End If
    If (doentirefile = False) Then icheck = 1
    Wend

    Application.ScreenUpdating = True
    Set bwutil = Nothing

    End Sub
    Sub ConvertAllBwGrk2Unicode()
    ConvertBwGrk2Unicode "bwgrkl", "Arial Unicode MS", True
    End Sub
    Sub ConvertAllBwHeb2Unicode()
    ConvertBwHeb2Unicode "bwhebb", "SBL Hebrew", True
    End Sub
    Sub ConvertAllBwLex2Unicode()
    ConvertBwLex2Unicode "bwlexs", "Arial Unicode MS", True
    End Sub
    Sub ConvertAllBwSym2Unicode()
    ConvertBwSym2Unicode "bwsymbs", "Arial Unicode MS", True
    End Sub
    Sub ConvertNextBwGrk2Unicode()
    ConvertBwGrk2Unicode "bwgrkl", "Arial Unicode MS", False
    End Sub
    Sub ConvertNextBwHeb2Unicode()
    ConvertBwHeb2Unicode "bwhebb", "SBL Hebrew", False
    End Sub
    Sub ConvertNextBwLex2Unicode()
    ConvertBwLex2Unicode "bwlexs", "Arial Unicode MS", False
    End Sub
    Sub ConvertNextBwSym2Unicode()
    ConvertBwSym2Unicode "bwsymbs", "Arial Unicode MS", False
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •