Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-18-2018, 03:19 PM
Robert Kay Robert Kay is offline Code to find numerical string + space throughout document  & replace them with Comma Windows 10 Code to find numerical string + space throughout document  & replace them with Comma Office 2016
Novice
Code to find numerical string + space throughout document  & replace them with Comma
 
Join Date: Feb 2018
Location: Australia
Posts: 4
Robert Kay is on a distinguished road
Default Code to find numerical string + space throughout document & replace them with Comma

I am new to Word Macros. I am assisting a local historical society by scanning old electoral rolls for the area, performing OCR and then copying the data into excel tables so the data can be searched electronically.
The OCR process produces a .txt file which I then open in Word 16 so I can clean it up and comma delineate the fields of data.
The entries are:
Roll Number (space) Surname, Forenames, Address, electoral district,gender followed by a carriage return (paragraph mark).
My problem is to incorporate a sub routine (maybe not the correct technical term) to place a comma after the Roll Number which is a number between 1 and 99,999.
I have tried to use the find and replace function, (which I use to get rid of unwanted spaces and errors when the OCR program identifies . (periods) as commas.


I note the street address usually contains numbers as does the Electoral District.

Any assistance would be appreciated in formulating the appropriate code.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to find numerical string + space throughout document  & replace them with Comma Find & Replace text in Field Code across multiple documents RPM7 Word VBA 6 05-12-2017 12:58 AM
Code to find numerical string + space throughout document  & replace them with Comma Find and Replace with space cheech1981 Word 3 03-29-2017 02:33 PM
How to do multiple find and replace in string. PRA007 Word VBA 2 01-06-2016 09:10 PM
Code to find numerical string + space throughout document  & replace them with Comma Find and replace a string of text errtu Word 1 01-31-2013 02:09 PM
Code to find numerical string + space throughout document  & replace them with Comma Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:08 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft