Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Using current selection in a word macro
I'm having an issue with word macros.
I'm trying to create a number of macros which involve doing certain things to whatever is selected, for example: Thanks some text, and put HTML tags round it so that "link text here" would become "a href="" title=""code example here/a". Anyone know if this is possible? |
#2
|
|||
|
|||
Hi Sebastian
VBA in Word always makes the Selection object available, and from that you can work out what text, if any, the user has selected. If you're new to VBA programming, you might like to see Creating a macro with no programming experience using the recorder http://www.word.mvps.org/FAQs/Macros...ngRecorder.htm and How to modify a recorded macro http://www.word.mvps.org/FAQs/Macros...ordedMacro.htm If you have follow up questions, you might like to use one of the VBA newsgroups such as microsoft.public.word.vba.general. Hope this helps. Shauna Kelly. Microsoft MVP. http://www.shaunakelly.com/word "sebFlyte" wrote in message ... I'm having an issue with word macros. I'm trying to create a number of macros which involve doing certain things to whatever is selected, for example: Thanks some text, and put HTML tags round it so that "link text here" would become "a href="" title=""code example here/a". Anyone know if this is possible? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Printing a current page in MS Word | Microsoft Word Help | |||
Word2000 letterhead merge | Mailmerge | |||
is word perfect compatible with office word? | Microsoft Word Help | |||
Macros - Keyboard Commands | Microsoft Word Help | |||
Continuous breaks convert to next page breaks | Microsoft Word Help |