Consulting

Results 1 to 11 of 11

Thread: Solved: Bible study

  1. #1

    Solved: Bible study

    Hallo, I need help in my bible study.
    I must format a text in this form:
    1) Where there is a word write in bold characters. I must write before <g> space Txt space and after </g>

    Example:[Mat 1,6]
    <g> Daui.dto.n </g>
    <g> Dabi.dto.n </g> j
    <g> Daui.dde. </g> Biz WH

    <g> Dabi.dde. </g>

    <g> de.evge,nnhsen </g> p<sup>1</sup> ? B G f1 f13 579 700 pc it<sup>g1,k</sup> vg<sup>mss</sup> sir<sup>s,c,p</sup> cop arm

    <g> de.o`basileu=jevge,nnhsen </g> C L W D P 33 157 892 1071 Biz vg sir<sup>h</sup> geo j; ND,Dio

    I hope that you read Greek.

    I had this previous Macro that works only with All UCase. How can be able modify this macro???

    Selection.HomeKey wdStory

    With Selection.Find
    .ClearFormatting
    .Font.Bold = True
    .Text = "<*>"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchAllWordForms = False
    .MatchSoundsLike = False
    .MatchWildcards = True
    End With

    While Selection.Find.Execute
    If Selection.Text = UCase(Selection.Text) Then
    Do
    If Selection.End = ActiveDocument.Range.End Then Exit Do
    If Not Selection.Next(wdWord, 1).Font.Bold Then Exit Do
    If Selection.Next(wdWord, 1).Text <> UCase(Selection.Next(wdWord, 1).Text) Then Exit Do
    Selection.MoveEnd wdWord, 1
    Loop
    Selection.InsertBefore "<p><b>"
    Selection.InsertAfter "</b>"
    End If
    Selection.Collapse wdCollapseEnd
    Wend


    Pasquale


  2. #2
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    Could you give your requirements again?

    You state:
    1) Where there is a word write in bold characters. I must write before <g> space Txt space and after </g>
    but all your examples already have <g> in them....so I do not understand. If they already have <g? there, why do you need to write it in again.

    Also, in the example code you are added <p> and <b> NOT <g>.

    So I have no idea what exactly you want.

  3. #3
    Hi Fumei, I write a final text.

    This is correct text to put before bold word or period <g> and after </g>:
    Example:
    [Mat 1,10]
    'Amw,j( 'Amw,j] ? B C (D in Luca) DGQP* f1 33 157 205 1071 1079 1291 1546 l68,(184),253,672,673,813,1223,1627 itc,(d),ff1,g1,k,q vgmss copsa,bo,fay arm et geo Atanasio Epifanio; CEI,TILC,Nv
    'Amw,n( 'Amw,n] E K L W P2S f13 28 180 565 579 597 (700 892 1195 l211 itaur,f 'Ammw,n) 1006 1009 1010 1216 1230 1241 1242 1243 1342 1365 1424 1505 1646 2148 Biz Lez ita vg(mss) sirc,s,p,h,pal (copmae) slav j (Ps-Eustatio) Agostino; NR,ND,Riv,Dio,NM

    Also the macro is bad for another work:
    this is correct macro:
    Sub Manoscritti1()
    '
    ' Manoscritti1 Macro
    ' Macro creata il 10/09/2005 da Pasquale
    '
    Selection.HomeKey wdStory

    With Selection.Find
    .ClearFormatting
    .Font.Bold = True
    .Text = "<*>"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchAllWordForms = False
    .MatchSoundsLike = False
    .MatchWildcards = True
    End With

    While Selection.Find.Execute
    If Selection.Text = UCase(Selection.Text) Then
    Do
    If Selection.End = ActiveDocument.Range.End Then Exit Do
    If Not Selection.Next(wdWord, 1).Font.Bold Then Exit Do
    If Selection.Next(wdWord, 1).Text <> UCase(Selection.Next(wdWord, 1).Text) Then Exit Do
    Selection.MoveEnd wdWord, 1
    Loop
    Selection.InsertBefore "<p><g>"
    Selection.InsertAfter " </g>"
    End If
    Selection.Collapse wdCollapseEnd
    Wend
    End Sub


    Thanks Pasquale

  4. #4
    Another error:
    Correct is:

    Selection.InsertBefore "<g>"
    Selection.InsertAfter " </g>"

  5. #5
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Hi Pasquale,

    In this code (you posted) the lines in red check for uppercase so just remove them (the complete lines - it looks like the VBA formatting changes the color of some of it):

    [vba]While Selection.Find.Execute
    If Selection.Text = UCase(Selection.Text) Then
    Do
    If Selection.End = ActiveDocument.Range.End Then Exit Do
    If Not Selection.Next(wdWord, 1).Font.Bold Then Exit Do
    If Selection.Next(wdWord, 1).Text <> UCase(Selection.Next(wdWord, 1).Text) Then Exit Do
    Selection.MoveEnd wdWord, 1
    Loop
    Selection.InsertBefore "<g>"
    Selection.InsertAfter "</g>"
    End If
    Selection.Collapse wdCollapseEnd
    Wend [/vba]

    I haven't tried using it but you may have to change the .Text on the find from "<*>" to just "". as well.
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  6. #6
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    Sorry, but your example text does not help at all. I will let Tony take this.

  7. #7
    Hi Tony,
    the macro works, but I have a problem,
    the greek words are written with apostrophised and accented characters, therefore the VBA macro recognises two words rather than one word.
    So it appears with the insert <g>opti'</g><g>ons</g> dividing one word in two.
    The macro should insert <g> at the beginning of a sequence of bold words and </g> at the end of the same sequence of bold words.
    Thanks
    Pasquale

  8. #8
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Hi Pasquale,

    Did you change the Text?

    Gerry,

    I have an advantage I have helped Pasquale before and got used to what he is doing.
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  9. #9
    Hi Tony,
    I had finished two works, this is another work with greek variants of Greek New Testament.
    I ever utilize your macro for merge text, and format every Text to utilize your macro.

    I think that it is the line to change (in your previuous macro it worked in a correct way with latin words).

    If Selection.Next(wdWord, 1).Text <> UCase(Selection.Next(wdWord, 1).Text) Then Exit Do
    Selection.MoveEnd wdWord, 1

    Pasquale

  10. #10
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    No, sorry, I think you are misunderstanding me.

    In the Find, change the text to look for ..[vba]

    With Selection.Find
    .ClearFormatting
    .Font.Bold = True
    .Text = "" ' <--- Change this line
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchAllWordForms = False
    .MatchSoundsLike = False
    .MatchWildcards = True
    End With[/vba]

    That should stop it breaking at word boundaries.
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  11. #11
    Hi Tony, you are a magician...with VBA,
    it works very well, I test it.

    New text is this?

    .Text = "" '

    I do understand?

    Thanks Pasquale

Posting Permissions

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