Przejdź do głównej zawartości

Jak zaznaczyć wszystkie tabele w dokumencie programu Word?

Autor: Sun Ostatnia modyfikacja: 2020-05-26

Zaznaczenie tabeli w programie Word jest łatwe, klikając przycisk symbol tabeli wyboru kropki przycisk w lewym górnym rogu tabeli, jak pokazano poniżej. Możesz także wybrać tabelę za pomocą funkcji Wybierz tabelę. Czy jest jednak sposób, aby szybko zaznaczyć wszystkie tabele naraz w dokumencie programu Word? Metody opisane w tym artykule pomogą ci przez to przejść. 


Wybierz wszystkie tabele w programie Word z kodem VBA

Z łatwością wybierz wszystkie tabele w programie Word za pomocą Kutools for Word


Wybierz wszystkie tabele w programie Word z kodem VBA

1. naciśnij inny + F11 klawisze, aby otworzyć Microsoft Visual Basic dla aplikacji okno.

2. W otwarciu Microsoft Visual Basic for Applications okno, kliknij wstawka > Moduł, Następnie skopiuj i wklej następujący kod VBA do okna Module;

Kod VBA: Wybierz wszystkie tabele w bieżącym dokumencie:

Sub selecttables()
Dim mytable As Table

For Each mytable In ActiveDocument.Tables
mytable.Range.Editors.Add wdEditorEveryone
Next
ActiveDocument.SelectAllEditableRanges (wdEditorEveryone)
ActiveDocument.DeleteAllEditableRanges (wdEditorEveryone)
End Sub

3. wciśnij F5 klucz do uruchomienia kodu

Następnie wszystkie tabele są natychmiast wybierane w bieżącym dokumencie.


Z łatwością wybierz wszystkie tabele w programie Word za pomocą Kutools for Word

W porównaniu z użyciem kodu VBA do wybrania wszystkich tabel w dokumencie, Kutools for Word's Wybierz tabele narzędzie jest bardzo przydatne. Możesz użyć tej funkcji, aby wybrać tabele w zaznaczeniu lub w całym dokumencie. Wykonaj następujące czynności:

Kutools dla Worda : Ponad 100 przydatnych dodatków do Worda, za darmo spróbować bez ograniczeń w 60 dni.

Kliknij Kutools > Stoły > Wybierz tabele. Zobacz zrzut ekranu:

Note: Aby wybrać zaznaczone tabele, musisz najpierw wybrać zakres, a następnie zastosować funkcję.

Następnie możesz zobaczyć wyniki w następujący sposób.

Wybierz wybrane tabele:

Wybierz tabele w całym dokumencie:

Jeśli chcesz skorzystać z bezpłatnej wersji próbnej tego narzędzia, przejdź do bezpłatnie pobrać oprogramowanie najpierw, a następnie przejdź do wykonania operacji zgodnie z powyższymi krokami.


Demo: Z łatwością wybierz wszystkie tabele w programie Word za pomocą Kutools for Word


Najlepsze narzędzia biurowe

Kutools dla Worda - Podnieś swoje doświadczenie ze słowami dzięki Over 100 Niezwykłe funkcje!

🤖 Kutools Asystent AI: Zmień swoje pisanie dzięki AI - Generuj zawartość  /  Przepisz tekst  /  Podsumowanie dokumentów  /  Zapytaj o informacje na podstawie Dokumentu, wszystko w programie Word

📘 Znajomość dokumentów: Podziel strony  /  Scal dokumenty  /  Eksportuj zaznaczenie w różnych formatach (PDF/TXT/DOC/HTML...)  /  Wsadowa konwersja do formatu PDF  /  Eksportuj strony jako obrazy  /  Drukuj wiele plików jednocześnie...

Edycja treści: Znajdź i zamień partii w wielu plikach  /  Zmień rozmiar wszystkich zdjęć  /  Transponuj wiersze i kolumny tabeli  /  Konwertuj tabelę na tekst...

🧹 Łatwe czyszczenie: Wymień Dodatkowe przestrzenie  /  Podziały sekcji  /  Wszystkie nagłówki  /  Pola tekstowe  /  Hiperłącza  / Więcej narzędzi do usuwania znajdziesz na naszej stronie Usuń grupę...

Kreatywne wstawki: Wstawić Tysiące separatorów  /  Pola wyboru  /  Przyciski Radio  /  Kod QR  /  kod kreskowy  /  Tabela linii ukośnych  /  Podpis równania  /  Tytuł Zdjęcia  /  Podpis tabeli  /  Wiele zdjęć  / Odkryj więcej w Wstaw grupę...

🔍 Precyzyjne wybory: Punktowy konkretne strony  /  stoły  /  kształty  /  nagłówki akapitów  / Ulepsz nawigację za pomocą jeszcze Wybierz funkcje...

Ulepszenia gwiazd: Nawiguj szybko do dowolnej lokalizacji  /  automatyczne wstawianie powtarzającego się tekstu  /  płynnie przełączaj się pomiędzy oknami dokumentów  /  11 Narzędzia konwersji...

???? Chcesz wypróbować te funkcje? Kutools dla Word oferuje Bezpłatna wersja próbna 60-day, bez ograniczeń! 🚀
 
Comments (11)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
How do i only select the tables and figure captions. All my captions have reverted back to normal style. I had captioned all of them but now they are all not linked to the caption
This comment was minimized by the moderator on the site
Very nice method. Thank you
This comment was minimized by the moderator on the site
It seeems that this macros does not work in Word 2016
This comment was minimized by the moderator on the site
It works in Word 2016. What error are you getting?
This comment was minimized by the moderator on the site
I understand already. For correct work macros cursor must to be not in table when you call macros. Thank you.
This comment was minimized by the moderator on the site
There are multiple tables in a document (about 200). I want to select all these tables only and paste them in a new document in the table format. When I select the tables as per above procedure then during paste operation it pastes them as text and not as table. Can you please help me?
This comment was minimized by the moderator on the site
The following modified code selects all tables, except tables having only one row: Sub SelAllTbls() ActiveDocument.DeleteAllEditableRanges (-1) Dim Tbl As Table For Each Tbl In ActiveDocument.Tables If Tbl.Rows.Count > 1 Then Tbl.Range.Editors.Add (-1) End If Next ActiveDocument.SelectAllEditableRanges (-1) ActiveDocument.DeleteAllEditableRanges (-1) End Sub The following code select only the header rows: Sub selallHeaders() On Error Resume Next ActiveDocument.DeleteAllEditableRanges (-1) Dim Tbl As Table For Each Tbl In ActiveDocument.Tables Tbl.Rows(1).Range.Editors.Add (-1) Next ActiveDocument.SelectAllEditableRanges (-1) ActiveDocument.DeleteAllEditableRanges (-1) End Sub I have many more such codes that select last rows, all bullets, small / long paras, etc. Watch my following video: https://www.youtube.com/watch?v=p_ZhufliFw8
This comment was minimized by the moderator on the site
Wonderful I got the solution by using the VBA code. Thank you so much
This comment was minimized by the moderator on the site
Nifty code at first but it definitely corrupted a bunch of tables in Word 2010. Screwed up my file pretty good and had to revert back to an earlier version. Be wary!
This comment was minimized by the moderator on the site
excellent macro and very easy
This comment was minimized by the moderator on the site
thank you so much he is good program but after few days stopped and require password and user name
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations