مغترب قام بنشر أكتوبر 15, 2005 قام بنشر أكتوبر 15, 2005 مرحبا شباب كل عام وانتم بخير ومبارك عليكم الشهر اهنيئكم بهذا المنتدى الرئع واتمنى لكم المزيد من التقدم لدي سؤال ارجوا ان تستطيعوا مساعدتي فية وهو ان لدي بحث والمطلوب من ان احصي كلمة معينة بالبحث يعني كم مره كتبت مثلاً ------------- =====محمد=======فيصل=== ===محمد====محمد====فهد=== ====أحمد===سعد========= ------------- يعني ابي الخص كم مرة ظهرت كلمة محمد ؟ شاكراً ومقدراً لكم
مغترب قام بنشر أكتوبر 16, 2005 الكاتب قام بنشر أكتوبر 16, 2005 شكراً لك اخي ولكن اريدة ان يظهر لي العدد لانة يوجد الكثير واكثر من كلمة انا حصلت مايكرو بعد جهد جهييييييد ولكن اطمح بحاجة اكثر تطور المايكرو حتى يستفيد الاعضاء ----------------------------- Sub CountWordPhrase() Dim x, Response, ExitResponse Dim y As Integer ' If an error occurs, continue the macro. On Error Resume Next AskAgain: ' Ask for the text to count. x = InputBox("Type the word you want to count and then click OK." _ & Chr$(13) & Chr$(13) & _ "NOTE: This macro will find a whole word only. If the text you typed " _ & "is part of a larger string, it will also be found.") ' If text typed is blank or spaces, then ask to quit. If x = "" Or x = " " Then ExitResponse = MsgBox("You either clicked Cancel or you did " & _ "not type a word. Do you want to quit?", vbYesNo) If ExitResponse = 6 Then End Else ' If answer No to quit, then ask for text to count again. GoTo AskAgain End If Else ' Search for and count occurrences of the text typed. With ActiveDocument.Content.find Do While .Execute(FindText:=x, Forward:=True, Format:=True, _ MatchWholeWord:=True) = True ' Display message in Word's Status Bar. StatusBar = "Word is counting the occurrences of the text " & _ Chr$(34) & x & Chr$(34) & "." y = y + 1 Loop End With ' Display Message Box with results. Response = MsgBox("The text " & Chr$(34) & x & Chr$(34) & " was found" _ & Str$(y) & " times.", vbOKOnly) End If End Sub -----------------------
المهاجر قام بنشر أكتوبر 16, 2005 قام بنشر أكتوبر 16, 2005 عفوا ،، كانت إجابتي ناقصة وذلك للاستعجالي .. الطريقة كالتالي: اختر بحث واستبدال... ثم اكتب في خانة البحث ( محمد ) وكذلك في خانة الإستبدال ( محمد ) ثم اعمل بحث واستبدال لجميع المستند بعد ذلك ، سيخبرك الوورد بأنه أجرى مثلا 50 استبدال ، وهذا هو عدد تكرار الكلمة .
الردود الموصى بها
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.