Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-15-2015, 07:44 AM
gmayor's Avatar
gmayor gmayor is offline macro to add brackets to each line and add single quotes to each word in the line Windows 7 64bit macro to add brackets to each line and add single quotes to each word in the line Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

The comma was present in your example.

Change the section below to lose the comma (Chr(44))



Code:
            If i < UBound(vWord) Then
                strNew = strNew & Chr(32)
            End If
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #2  
Old 02-15-2015, 07:55 AM
bracketandquotes bracketandquotes is offline macro to add brackets to each line and add single quotes to each word in the line Windows 8 macro to add brackets to each line and add single quotes to each word in the line Office 2010 32bit
Novice
macro to add brackets to each line and add single quotes to each word in the line
 
Join Date: Feb 2015
Posts: 8
bracketandquotes is on a distinguished road
Default

Sorry for not being clear.

What I meant is that after I ran your code there is no comma seperating the text in the results.

After the vba is run i would like there to be commas between the values like in the example where they are highlighted in red.
('AFG', 'FKFKF', 'DDJ', 'DKKFJG', 'DKDKJDJF'),


thanks for all your help and taking the time to write the code. I do appreciate it.

I have 29,300 records that need to have brackets and quotes and commas entered so the code is saving me an enormous amount of time.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
macro to add brackets to each line and add single quotes to each word in the line How many points is line spacing 'single'? Ugeen Word 2 11-24-2013 03:14 PM
macro to add brackets to each line and add single quotes to each word in the line Changing single-quotes to double-quotes Bobosmite Word 5 04-15-2013 06:40 AM
From the command line, how do I run a Word macro? jdockstader Word 7 02-04-2013 06:09 AM
Single Line Spacing for Short Lists? tatihulot Word 2 04-20-2010 02:53 PM
macro to add brackets to each line and add single quotes to each word in the line Different alignments in a single line George99 Word 2 01-24-2010 05:49 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:29 PM.


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