Repeat find in word

When you perform a search in Word, and there exist many occurrences of your keyword(s), you don’t need to find them using all the time the main Find Dialogue. You can jump to the next occurrence immediately by pressing Shift+F4, or Ctrl+Alt+y. Yet these shortcuts are not very convenient, especially if you are used to different ones by working with other text processors.

You can change the “Find Again” Word shortcut to, e.g. just F3, if you go to the Word Options -> Customize the Ribbon -> Keyboard Shortcuts. Locate the “All Commands” option at the left and then the RepeatFind command at the right, to which you can assign whatever shortcut you want.

Check also Super Find, a macro that will let you enjoy automatic placement of searched and found terms near the middle of Word’s window. Assign a keyboard shortcut to use the macro effectively. I use F3, which is the default key for RepeatFind; for the latter I use Alt+F3.

* Check more of these Word productivity macros. Enjoy!

How can I make a macro start at the beginning of a doc and repeat it until the end of the word doc and not have to manually repeat the macro all the time?

I read that I should use DO UNTIL/WHILE LOOP but I have no idea how to do it, since I created the macro with the «RECORD MACRO» function of Word.

I managed to repeat a couple of times, copying and pasting the relevant parts of the code. Of course, it only repeats for as many times I pasted it.

This is what Word recorded (it works fine for 1 line, finds a tab character and moves the line 5.5 cm left).

Sub aaTabs()
'
' aaTabs Macro
'
'
    Selection.HomeKey Unit:=wdStory
    Selection.Find.ClearFormatting
    With Selection.Find
        .Text = "^t"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute
    With Selection.ParagraphFormat
        .SpaceBeforeAuto = False
        .SpaceAfterAuto = False
        .FirstLineIndent = CentimetersToPoints(-5.5)
    End With
End Sub

Community's user avatar

asked Dec 12, 2014 at 22:18

Latorredetalero's user avatar

How about this, it only works if the tab is the first character, not sure if this is what you want or not

Sub MoveTab()
Dim para As Paragraph
For Each para In ActiveDocument.Paragraphs
 If para.Range.Characters(1) = Chr(9) Then
    para.Format.FirstLineIndent = CentimetersToPoints(-5.5)
 End If
Next para
End Sub

answered Dec 13, 2014 at 0:12

DMDesign's user avatar

  • Remove From My Forums
  • Question

  • I am using a windows 8 computer with word 2010.

    when I press f3 it just adjusts my brightness. I am wondering how do I make it a repeatfind shortcut?

    Ive gone to customize ribbons and keyboard shortcuts doesn’t even come up nor does repeat find.

    help????

    Thanks

Answers

  • Hi Brooke,

    Please follow these steps to reassign:

    1. File -> Options -> Customize Ribbon -> Customize…;

    2. At Customize Keyboard list box, under Categories, choose Commands Not in the Ribbon;

    3. Under Commands list box, select RepeatFind;

    4. In the «Press new shortcut key» inputbox, pressed F3;

    5. It’s very important to remember to verify that «Save changes in» was set to «Normal.dotm» before clicking the Assign button.

    To see what command is assigned to a particular keyboard shortcut, place the insertion point in the «Press new shortcut key» box, press the key or key combinations that you want to test, and see what is listed after «Currently assigned to.»


    Karen Hu
    TechNet Community Support

    • Marked as answer by

      Friday, October 4, 2013 1:38 AM

  • Hi,

    check the instruction manual for your computer. I’m guessing you have a laptop or tablet/hybrid, some of these devices require you to press the «Fn» key at the same time as F1-F12, to get the alternate F1-F12 function/purpose.


    Don
    (Please take a moment to «Vote as Helpful» and/or «Mark as Answer», where applicable.

    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

    • Marked as answer by
      Tony Chen CHN
      Monday, October 7, 2013 2:45 PM

  • Did you make sure to look in the Customize Keyboard dialog box, in the «All Commands» category? At File tab | Options | Customize Ribbon, click the Customize button to open the dialog box.

    However, note that there is a built-in shortcut for the RepeatFind command: Shift+F4. You should be able to use it directly.


    Stefan Blom, Microsoft Word MVP

    • Marked as answer by
      Tony Chen CHN
      Monday, October 7, 2013 2:45 PM

Word: Find duplicated words

  1. Press Ctrl+H to open the Find and Replace dialog box.
  2. Click More, then select the Use wildcards option.
  3. In the Find field, type: (<[A-Za-z]@)[ ,.;:]@1> (Note: There’s a space in there, so I suggest you copy this Find string.)
  4. In the Replace field, type: 1.
  5. Click Find Next then click Replace. Repeat.

How do you find the most repeated word in a string?

Program:

  1. import java. io. BufferedReader;
  2. import java. io. FileReader;
  3. import java. util. ArrayList;
  4. public class MostRepeatedWord {
  5. public static void main(String[] args) throws Exception {
  6. String line, word = “”;
  7. int count = 0, maxCount = 0;
  8. ArrayList<String> words = new ArrayList<String>();

How do I count duplicate words in a string in Java?

ALGORITHM

  1. STEP 1: START.
  2. STEP 2: DEFINE String string = “Big black bug bit a big black dog on his big black nose”
  3. STEP 3: DEFINE count.
  4. STEP 4: CONVERT string into lower-case.
  5. STEP 5: INITIALIZE words[] to SPLIT the string.
  6. STEP 6: PRINT “Duplicate words in a given string:”
  7. STEP 7: SET i=0.
  8. STEP 8: SET count =1.

How do you find repetition?

In general, repetitions are taken care of by dividing the permutation by the factorial of the number of objects that are identical. If you look at the word TOOTH, there are 2 O’s in the word. Both O’s are identical, and it does not matter in which order we write these 2 O’s, since they are the same.

How do you solve permutations without repetition?

The formula to calculate all permutations without repetitions of the set {1,2,3} is n! (n−r)!

Is there repetition in combination?

Any selection of r objects from A, where each object can be selected more than once, is called a combination of n objects taken r at a time with repetition. Two combinations with repetition are considered identical if they have the same elements repeated the same number of times, regardless of their order.

What is combination without repetition?

The combinations without repetition of elements taken in are the different groups of elements that can be formed by these elements, so that two groups differ only if they have different elements (that is to say, the order does not matter).

How many combinations of 5 items are there?

120

How many combinations of 3 items are there?

27

How many permutations of 4 are there?

Therefore, there are 4· 3 or 12 possible ways to choose two letters from four. ab means that a was chosen first and b second; ba means that b was chosen first and a second; and so on. Thus the number of permutations of 4 different things taken 4 at a time is 4!.

How many 4 letter combinations are there?

Why Limit The Combinations To Only 7?

Characters Combinations
4 24
5 120
6 720
7 5,040

How many permutations are there for 6 numbers?

720 different permutations

How many combinations of 6 items are there?

64

How many possibilities are there for a 6 digit password?

“In eleven hours, 100 number combinations can be tested,” said Markert. As attackers can try more Android PINs, a blacklist would make more sense on Android devices….Why six digit PINs are no better for security than four digits.

Four digit Six digit
1234 123456
0000 654321
2580 111111
1111 000000

What is a good 4 digit password?

Researchers at the data analysis firm Data Genetics have found that the three most popular combinations—“1234,” “1111,” and “0000”—account for close to 20 percent of all four-digit passwords.

What is a 6 digit PIN code?

The Postal Index Number (PIN) or PIN Code is a 6 digit code of Post Office numbering used by India Post. The PIN was introduced on August 15, 1972. There are 9 PIN regions in the country. The first 8 are geographical regions and the digit 9 is reserved for the Army Postal Service.

How long does it take to crack a 6 digit PIN?

22.2 hours

How long would it take to crack a 4 digit code?

As such, each PIN entry takes approximately 40 seconds, meaning that it would take up to ~111 hours to bruteforce a 4 digit PIN.

Can John the Ripper crack any password?

John the Ripper (also called simply ‘John’ ) is the most well known free password cracking tool that owes its success to its user-friendly command-line interface. John has autodetect capability, which often works fine, but in some cases, it might be necessary to guess the hash type.

How did all my passwords get compromised?

Most security breaches are the result of one thing: sloppy password practices. Too many people make the mistake of choosing weak passwords, or reusing passwords that they have used elsewhere on the internet – making life too easy for malicious hackers trying to gain unauthorised access.

What is the most strongest password?

According to the traditional advice—which is still good—a strong password:

  • Has 12 Characters, Minimum: You need to choose a password that’s long enough.
  • Includes Numbers, Symbols, Capital Letters, and Lower-Case Letters: Use a mix of different types of characters to make the password harder to crack.
  • Remove From My Forums
  • Question

  • I’m trying to get a macro to run in Word 2007 that was working on Word 2003.  The macro hangs after the first loop of a find loop.  Below is the code that was working in word 2003.

                oWD.Activate
                Set rDcm = ActiveDocument.Range
                Set rTmp = Selection.Range
                With rDcm.Find
                    .Format = False
                    .Wrap = wdFindStop
                    .Text = _
                        «???????????????????????»»COMMAND START»»                           
    ?EXEC?*»»COMMAND END»»                              ?EXEC?»
                    .MatchWildcards = True

                    While .Execute
                        Set rTmp = rDcm.Duplicate
                        rTmp.Select
                        Selection.MoveDown Unit:=wdLine, Count:=4, Extend:=wdExtend
                        Selection.Copy
                        Documents(pp_log).Activate
                        Selection.Paste
                        Call get_pp_data(pp_log, stepper, oWB)
                        Documents(pp_log).Activate
                        Selection.WholeStory
                        Selection.Delete Unit:=wdCharacter, Count:=1
                        .Text = _
                        «???????????????????????»»COMMAND START»»                           
    ?EXEC?*»»COMMAND END»»                              ?EXEC?»
                    Wend
                End With

    The oWD is a large text document (>1600 pages) and the text string I’m searching for uses wild cards and is a large number of characters (>255).  The code I pasted searches for the text string and copies it to another document where I extract
    information using another call procedure.  It then deletes that string from the document and repeats the find in oWD.  This code runs through one loop and then hangs.

    I have changed the .Execute line to Do While .Execute(FindText:=strText, MatchWildCards:=True) but I get the same results.

Answers

  • I stepped through the above loop and it did delete the text in the Documents(pp_log) document.  Where it hung up was at the line

                         Selection.MoveDown Unit:=wdLine, Count:=4, Extend:=wdExtend

    This is extending the selection down 4 lines and was the only way I knew of doing this.  The text in oWD is just lines of text with no formating so moving the cursor by characters, words or lines was the only way I knew of moving and getting the information
    I wanted.

    In the call procedure I’m using the selection to extract the information I’m looking for after a successful find.execute.  The text used for the find is common and the information I’m extracting is unique, so I’m moving the cursor a specific number
    of characters/words after the find.execute.

    Does that make any sense?

    Edit:

    The above doesn’t seem to be accurate.  I was stepping through the code again and was getting some statistics for the two documents and it seems the oWD document is causing the problem since it keeps giving me «Word is finishing analyzing your
    document» and this doesn’t stop.  I’m not sure what to do when opening the file to prevent this from happening.  I was opening it at a word document and changed it to Format:=wdOpenFormatText but that didn’t help.  I  have the following
    to «help» speed up opening the document (even though I had visible:=false when the code did run in word 2003):

                Application.Options.CheckSpellingAsYouType = False
                Application.Options.CheckGrammarAsYouType = False
                Application.ScreenUpdating = False

    Some statistics of one oWD document shows >360K words.  Opening it outside the macro isn’t a problem.

    Edit #2:

    I unchecked «Keep track of formatting» and it seems to be running!

    • Edited by

      Thursday, January 13, 2011 8:50 PM
      Solution found?

    • Marked as answer by
      Cindy Meister MVP
      Sunday, January 16, 2011 8:36 AM

Понравилась статья? Поделить с друзьями:
  • Repeat a word over and over
  • Related word for water
  • Remove all styles in word
  • Repairing an excel file
  • Related word for technology