#1
|
|||
|
|||
Using EditFind in VBA on Word 2010
I believe this is a question for Microsoft programmers. I am trying to incorporate an EditFind command within a VBA procedure in Word 2010. It should exactly equal what would happen if you chose View, Macros, View Macros, Word Commands (under "Macros in"), EditFind, Run. (This could also be performed in Word 2010 by using "Advanced Find" on the dropdown choice for the Navigation bar, or by typing Alt-E, F.)
In 2007 or earlier, I could do this with either of the following With Selection.Find .MatchWholeWord = TrueEnd With On Error Resume Next Application.Run MacroName:="EditFind" _________________ - OR - _________________ On Error Resume Next With Dialogs(wdDialogEditFind) .Find = ""End With However, when I try using this code in Word 2010, the following results:
Thank you. |
#2
|
|||
|
|||
1. you have cross-posted this. http://www.vbaexpress.com/forum/showthread.php?t=45553
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184 2. you are not even giving the same information that you (eventually) posted elsewhere - i.e. you want to use special characters And just to reiterate, yes you are correct the find dialog acts a little bit differently in 2010 - go figure. The Find Next (which gets you the Enter action you want) does not appear to be the same. In pre-2010 the Next button has the default focus; 2010 does not. You are going to have to live with it. Use a userform and try to code the actions you want. |
#3
|
|||
|
|||
Using EditFind in VBA on Word 2010
Fumei,
I have posted an apology on the VBAExpress forum for cross-posting (http://www.vbaexpress.com/forum/showthread.php?t=45553). The reason I posted here was I thought this was a Microsoft website, and that Microsoft programmers might pick up on this. Nevertheless, I was inconsiderate in cross-posting without letting you know. Just wasn't thinking. I did come up with a workaround using CommandBars.FindControl, which I've shared on the linked address above. Actually, I had tried it before but just didn't follow through on it. Thank you. All the best! As to the msofficeforums forum, my apologies to you also - please consider this post closed. |
Tags |
2010, advanced find, editfind |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Graphics Created in Word 2003 Cannot Be Displayed in Word 2010 | mwildem | Drawing and Graphics | 3 | 02-14-2013 10:59 AM |
Are user customizations transferable from Word 2003 to Word 2010 (2013)? | New Daddy | Word | 3 | 01-14-2013 07:25 AM |
Word auto-repair differences between word 2007 - 2010. | Svekris | Word | 2 | 05-13-2012 03:12 AM |
Problem saving in Word 2007 a dotm Addin developed in Word 2010 | RichardP | Word VBA | 6 | 04-26-2012 04:22 AM |
Word 2010 and Excel 2010 Mail merge - multiple headers | robby | Word | 3 | 04-18-2012 06:37 PM |