Results 1 to 2 of 2

Thread: End of File

  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    End of File

    I've tried but can't come up with a solution. Please help!

    In Word 97, I would like to add the necessary instructions so that the following operation (which I obtained here) is repeated until the insertion point reaches the end of the file.
    ++++++++++++++++
    Dim strCode As String
    Dim lngPadZeros As Long
    Dim ParrafoCode As String

    On Error GoTo NoSelection

    Selection.Find.ClearFormatting
    With Selection.Find
    .Text = "^p"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    End With
    Selection.Find.Execute
    Selection.MoveRight Unit:=wdCharacter, Count:=1

    strCode = CStr(Asc(Selection))
    lngPadZeros = 3 - Len(strCode)
    ParrafoCode = "^" & String$(lngPadZeros, "0") & strCode

    If ParrafoCode = "^013" Then

    Selection.MoveRight Unit:=wdCharacter, Count:=1

    Else

    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.Delete Unit:=wdCharacter, Count:=1
    Selection.TypeText Text:=" "

    End If

    NoSelection:
    +++++++++++++++
    Any assistance appreciated, as always!

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: End of File

    Does this help?

    <A target="_blank" HREF=http://support.microsoft.com/support/kb/articles/Q212/5/55.ASP>http://support.microsoft.com/support/kb/ar...s/Q212/5/55.ASP</A>

    You might able to utilize the endofdoc bookmark.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

Posting Permissions

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