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

نسخ جميع الجداول من الملف إلى ملف آخر:


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

يحتاج الباحث كثيرا إلى استخراج الجداول فقط إلى ملف مستقل للنظر فيها، خصوصا إذا كانت مشتملة على أبيات شعرية، لترتيبها، أو ذكر بحرها ووزنها.

وهذا الماكرو يقوم بذلك:

'
'ماكرو لنسخ كل الجداول من الملف إلى ملف آخر
'
   Dim Source As Document
    Dim Target As Document
    Dim Tbl As Table
    Dim tr As Range

n = ActiveDocument.Tables.Count
    If n = 0 Then
        MsgBox "لا يوجد جداول ", vbOKOnly

 Exit Sub
 Else
 End If

    Set Source = ActiveDocument
    Set Target = Documents.Add

    For Each Tbl In Source.Tables
        Set tr = Target.Range
        tr.Collapse wdCollapseEnd
        tr.FormattedText = Tbl.Range.FormattedText
        tr.Collapse wdCollapseEnd
        tr.Text = vbCrLf
    Next
Beep
End Sub

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

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