Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default How do I change 6 digit field, cols 1 thru 6 to one (1) blank?

Assuming that each record is a separate paragraph, a macro containing the
following code will do it:

Dim i As Long
Dim frange As Range
With ActiveDocument
For i = 1 To .Paragraphs.Count
Set frange = .Paragraphs(i).Range
frange.End = frange.Start + 6
frange.Delete
Next i
End With

Or using a Wildcard replace with

^13[0-9]{6}

in the Find what control and

^p

in the replace with control will do what you want for all but the first
record in the document

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Bentley_the_cat" wrote in
message ...
How do I change a 6 digit field in columns 1 thru 6 to one (1) blank or
null?
It's an 80 character record with random 6 digit numbers in the first 6
positions that I need to delete and file is too big to do by hand.

Any Ideas?

thanks,
Bentley


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
lost 25 digit code but have 20 digit cert of auth code dan666666 Microsoft Word Help 1 June 25th 07 03:14 PM
Two decimal digit not printing correctly when last digit is a zero Catherine Mailmerge 1 January 19th 07 04:36 AM
How can I create a table w/ 5 cols. & 2/rows, then sort col 5 to Me Tables 1 July 26th 06 06:25 PM
Can you change formatting from 1 column to 2 cols. automatically? FORMATTING Microsoft Word Help 1 April 3rd 06 11:03 PM
Supress the blank space from a blank data field? John Mailmerge 3 September 20th 05 04:31 PM


All times are GMT +1. The time now is 05:22 AM.

Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"