Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Word Newsgroups
Word VBA
Adding commas to a number
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Graham Mayor, post: 5874593"] Try Dim sText As String With Selection .HomeKey Unit:=wdStory With .Find .ClearFormatting .Replacement.ClearFormatting Do While .Execute(findText:="[0-9]{4,}", _ MatchWildcards:=True, Wrap:=wdFindStop, _ Forward:=True) = True sText = Selection.Range sText = Format(sText, "###,###,##0") Selection.TypeText sText Loop End With End With -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP <>>< ><<> ><<> <>>< ><<> <>>< <>><<> [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Word Newsgroups
Word VBA
Adding commas to a number
Top