Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Long Documents / November 2003

Tip: Looking for answers? Try searching our database.

Add quotes around selected text

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kiwichico - 25 Nov 2003 01:50 GMT
Hi all, does anyone know whether it is possible to add quotes around
selected block of text by pressing a macro.
Thanks in advance,
Kiwichic
Greg Maxey - 25 Nov 2003 02:23 GMT
Kiwichico,

Apply this macro:

Sub QuoteSelection()
If Selection.End - Selection.Start = 0 Then Exit Sub
Selection.InsertBefore Chr$(34)
If Selection.Characters.Last.Text = " " Then _
   Selection.MoveEnd wdCharacter, -1
Selection.InsertAfter Chr$(34)
Selection.Collapse wdCollapseEnd

End Sub

Signature

Greg Maxey
A peer in "peer to peer" support
Rockledge, FL
To e-mail, first edit out the "w...spam" in the displayed address.

> Hi all, does anyone know whether it is possible to add quotes around a
> selected block of text by pressing a macro.
[quoted text clipped - 5 lines]
> ~~View and post usenet messages directly from
> http://www.ExcelForum.com/
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.