bombdropVB
Programmer
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???
thanks
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???
Code:
'Loop Through the array placing in the address info For intLoop = 1 To UBound(vntAddress) 'See if the Array elemnt has a value If Len(vntAddress(intLoop)) Then objRange.Find.Execute FindText:="Line " & intLoop & ">", Forward:=True, _ replacewith:=vntAddress(intLoop), Replace:=wdReplaceAll Else objRange.Find.Execute FindText:="Line " & intLoop & ">", Forward:=True, _ replacewith:=vbKeyDelete, Replace:=wdReplaceAll End If 'Len(vntAddress(intLoop)) Next 'intloop
thanks