![]() |
#1
|
|||
|
|||
![]()
I'm trying to create a Word 2010 macro that finds, selects, and reformats a single word in my document starting from the current cursor position. During recording of the macro, I've tried to use Find in the menu (Ctrl-F) but nothing is recorded in my macro for the find operation even though the cursor moves and highlights the found word. I've tried using the code below but that is also not moving the current cursor position to this word. Can somebody tell me how to record a Find text operation in a Word macro or else tell me what the correct VBA code is to do this? Thanks in advance!
Selection.Find.Text = "Synposis" Selection.Find.Execute Selection.Style = ActiveDocument.Styles("Body Text") Selection.Font.Bold = wdToggle |
Tags |
macro find text |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Peter Stahl | Word VBA | 2 | 08-09-2013 03:18 AM |
![]() |
gregory | Outlook | 2 | 04-28-2012 10:53 PM |
![]() |
ishaw | Word | 1 | 10-17-2011 02:23 AM |
Unable to select anything in an MS Word Document | PaulT | Word | 0 | 08-08-2011 07:45 PM |
![]() |
JosL | Office | 3 | 03-07-2009 12:40 PM |