اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

ارجوا مساعدتي في عد الكلمات


مغترب

الردود الموصى بها

مرحبا شباب

كل عام وانتم بخير ومبارك عليكم الشهر

اهنيئكم بهذا المنتدى الرئع واتمنى لكم المزيد من التقدم

لدي سؤال ارجوا ان تستطيعوا مساعدتي فية وهو ان لدي بحث

والمطلوب من ان احصي كلمة معينة بالبحث يعني كم مره كتبت

مثلاً

-------------

=====محمد=======فيصل===

===محمد====محمد====فهد===

====أحمد===سعد=========

-------------

يعني ابي الخص كم مرة ظهرت كلمة محمد ؟

شاكراً ومقدراً لكم

رابط هذا التعليق
شارك

شكراً لك اخي ولكن اريدة ان يظهر لي العدد لانة يوجد الكثير واكثر من كلمة

انا حصلت مايكرو بعد جهد جهييييييد ولكن اطمح بحاجة اكثر تطور

المايكرو حتى يستفيد الاعضاء

-----------------------------

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

-----------------------

رابط هذا التعليق
شارك

عفوا ،، كانت إجابتي ناقصة وذلك للاستعجالي ..

الطريقة كالتالي:

اختر بحث واستبدال...

ثم اكتب في خانة البحث ( محمد ) وكذلك في خانة الإستبدال ( محمد )

ثم اعمل بحث واستبدال لجميع المستند بعد ذلك ، سيخبرك الوورد بأنه أجرى مثلا 50 استبدال ، وهذا هو عدد تكرار الكلمة .

رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information