Reply
 
Thread Tools Display Modes
  #1   Report Post  
justincrywolf justincrywolf is offline
Junior Member
 
Posts: 0
Default adding quotes around paragraphs

I have about 120 documents that are full of quotes about customer's experiences with different companies. I've managed to use different macros to snag the customer information and delete it, adjust the spacing between the paragraphs, etc. The one thing that I can't figure out is some way to automate (via macro or find/replace or whatever) putting quote marks around all these paragraphs.

I've already told my boss that even considering asking me to go through and add them by hand is wholly unacceptable. Haha

Any help is greatly appreciated!

Justin
  #2   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 adding quotes around paragraphs

Use a macro containing the following code:

Dim i As Long
Dim prange As Range
With ActiveDocument
For i = 1 To .Paragraphs.Count
Set prange = .Paragraphs(i).Range
With prange
.End = .End - 1
.InsertBefore Chr(34)
.InsertAfter Chr(34)
End With
Next i
End With

Or, using EditReplace with ^p in the Find what control and "^p" in the
replace with control will do almost everything that you want.

--
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

"justincrywolf" wrote in message
...

I have about 120 documents that are full of quotes about customer's
experiences with different companies. I've managed to use different
macros to snag the customer information and delete it, adjust the
spacing between the paragraphs, etc. The one thing that I can't figure
out is some way to automate (via macro or find/replace or whatever)
putting quote marks around all these paragraphs.

I've already told my boss that even considering asking me to go through
and add them by hand is wholly unacceptable. Haha

Any help is greatly appreciated!

Justin




--
justincrywolf


  #3   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 adding quotes around paragraphs


Use a macro containing the following code:

Dim i As Long
Dim prange As Range
With ActiveDocument
For i = 1 To .Paragraphs.Count
Set prange = .Paragraphs(i).Range
With prange
.End = .End - 1
.InsertBefore Chr(34)
.InsertAfter Chr(34)
End With
Next i
End With

Or, using EditReplace with ^p in the Find what control and "^p" in the
replace with control will do almost everything that you want.

--
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

"justincrywolf" wrote in message
...

I have about 120 documents that are full of quotes about customer's
experiences with different companies. I've managed to use different
macros to snag the customer information and delete it, adjust the
spacing between the paragraphs, etc. The one thing that I can't figure
out is some way to automate (via macro or find/replace or whatever)
putting quote marks around all these paragraphs.

I've already told my boss that even considering asking me to go through
and add them by hand is wholly unacceptable. Haha

Any help is greatly appreciated!

Justin




--
justincrywolf


  #4   Report Post  
justincrywolf justincrywolf is offline
Junior Member
 
Posts: 0
Default

I had already tried the find and replace and for some reason that wasn't working. It might have something to do with the other macros I run before I get to this point. The macro you gave me did work though! Now to just iron out the last few formatting wrinkles and I'll be set! Thanks a ton Doug!

Justin

Quote:
Originally Posted by Doug Robbins - Word MVP View Post
Use a macro containing the following code:

Dim i As Long
Dim prange As Range
With ActiveDocument
For i = 1 To .Paragraphs.Count
Set prange = .Paragraphs(i).Range
With prange
.End = .End - 1
.InsertBefore Chr(34)
.InsertAfter Chr(34)
End With
Next i
End With

Or, using EditReplace with ^p in the Find what control and "^p" in the
replace with control will do almost everything that you want.

--
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
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
Can I search for straight quotes (") and exclude curly quotes (€œ € Eric Microsoft Word Help 4 May 1st 23 02:47 PM
Change straight quotes to curly quotes in an existing document Eric Microsoft Word Help 9 July 22nd 20 12:50 PM
Finding all paragraphs with quotes jezzica85 Microsoft Word Help 10 February 20th 08 09:07 PM
Word 2003 is adding extra lines between some paragraphs in my docu bsc Microsoft Word Help 2 February 10th 07 08:45 PM
Script to change Smart quotes to straight quotes for all users? Michael Microsoft Word Help 1 November 15th 06 05:12 AM


All times are GMT +1. The time now is 12:38 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"