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

إستبدال المسافات بأسطر جديدة


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

هذا الكود كتبته بناء علي طلب من أحد الأخوة ، كان يريد إستبدال المسافات فى ملف وورد بسطر جديد

أي يريد توزيع الكلمات كل فى سطر جديد

Sub replaceit()


spacecount = 0

Selection.WholeStory

scount = Selection.Characters.Count

For i = 1 To scount

 If Selection.Characters(i).Text = " " Then spacecount = spacecount + 1

Next



    For i = 1 To spacecount

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

             i & "/" & Mcount & "       Please Wait......."

    

       With Selection.Find

        .Text = " "

        .Replacement.Text = ""

       End With

    'If Selection.Find.Found = False Then Exit Sub

    Selection.Find.Execute

    Selection.TypeParagraph

    Next i

End Sub

replacespacewithenter.zip

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

  • 2 years later...

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