Results 1 to 5 of 5

Thread: Delete Whole Line [Resolved]

Threaded View

  1. #1

    Thread Starter
    Fanatic Member Bombdrop's Avatar
    Join Date
    Apr 2001
    Location
    St Helens, England, UK
    Posts
    667

    Angry Delete Whole Line [Resolved]

    Hi all im trying to delete a whole line in a document if a element of an array has no value

    my code at present just place "46" there due to me using VBKeyDelete, so what do i do to replace the ,marker by completley deleting the line???




    VB Code:
    1. 'Loop Through the array placing in the address info
    2.     For intLoop = 1 To UBound(vntAddress)
    3.         'See if the Array elemnt has a value
    4.         If Len(vntAddress(intLoop)) Then
    5.             objRange.Find.Execute FindText:="<Address Line " & intLoop & ">", Forward:=True, _
    6.                 replacewith:=vntAddress(intLoop), Replace:=wdReplaceAll
    7.         Else
    8.             objRange.Find.Execute FindText:="<Address Line " & intLoop & ">", Forward:=True, _
    9.                 replacewith:=vbKeyDelete, Replace:=wdReplaceAll
    10.         End If 'Len(vntAddress(intLoop))
    11.     Next 'intloop

    Thanks

Posting Permissions

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



Click Here to Expand Forum to Full Width