Database export table structure design word document

1. The table in the word document exported by the DBExportDoc V1.0 For Oracle tool has no border.

2. The following macros can be used to set the border after selecting all the tables.
ALT+F8, open the macro dialog and create a macro named SelectAllTables. The code is as follows:
Sub SelectAllTables()
    Dim tempTable As Table
  
    Application.ScreenUpdating = False
  
    'Determine whether the document is protected
    If ActiveDocument.ProtectionType = wdAllowOnlyFormFields Then
        MsgBox "The document is protected, multiple tables cannot be selected at this time!"
        Exit Sub
    End If
    'Delete All editable regions
    ActiveDocument.DeleteAllEditableRanges wdEditorEveryone
    'Add editable regions
    For Each tempTable In ActiveDocument.Tables
        tempTable.Range.Editors.Add wdEditorEveryone
    Next
    'Select all editable regions
    ActiveDocument.SelectAllEditableRanges wdEditorEveryone
    'Delete all editable areas
    ActiveDocument.DeleteAllEditableRanges wdEditorEveryone
  
    Application.ScreenUpdating = True
  
End Sub

After saving, choose to load the macro.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326491039&siteId=291194637