اذهب الي المحتوي
أوفيسنا

إستبدال التنسيقات آليا فى الوورد


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

لو كنت تريد تغيير تنسيق كلمة معينه فالحل هو انكت تذهب لمربع بحث واستبدال وتقوم في مربع البحث وتضع الكلمة التي تريد وفي مربع استبدل بـ ضع الموشر هناك واضغط على زر تنسيق ونسق بالشكل الذي تريد

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

Edit --> Replace -->More--> Format

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

و لمن لم يري مكان تغيير الفورمات من مربع حوار الاستبدال

فليضغط علي زر more الموجود أسفل مربع الحوار

و الحل بالكود ( كمثال لمن أراد استخدام أكثر تعقيدا ) :

Rem لتغيير الفونت لكلمة معينة


Sub replaceformat()

searchword = InputBox("Enter the word to replace Format", "replace format of a word", "M")

Application.ScreenUpdating = True


nextword:

Selection.WholeStory

Mcount = Selection.Words.Count

' MsgBox mcount

For I = 1 To Mcount


With Selection.Words(I)

Application.StatusBar = "Searching / Formating ...." & _

Mcount & " Please Wait......."

If Searchit(.Text) = True Then

.Font.Name = "Courier"

.Font.Size = 14

.Font.Bold = False

.Font.Italic = False

End If

End With

Next I


End Sub


Function Searchit(Myword)

Searchit = False

If Trim(UCase(Myword)) = Trim(UCase(searchword)) Then

Searchit = True

End If

End Function

  
ثم اضاف حارث مشكورا الماكرو التالي كحل مباشر ( أفضل ) :
Selection.Find.ClearFormatting

    Selection.Find.Replacement.ClearFormatting

    With Selection.Find

        .Text = "هـ"

        .Replacement.Text = "هـ"

        .Replacement.Font.Name = "Arial"

        .Forward = True

        .Wrap = wdFindContinue

        .Format = True

    End With

    Selection.Find.Execute Replace:=wdReplaceAll

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

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