batch change tables and their captions to pictures in Ms Word

Thu 11 May, 2017 12:57 am
hello ,

In word, table and its caption is divided. And I want to make them as one picture , so I can select and move them easily , and others can not edit my tables. So I make a screenshoot for a table and its caption to save them as one picture.

It's fine to do that with one table. But I have a lot of tables to deal with.

So I need a quick way to batch change tables and their captions to pictures in a word files . Any help will be appreciated.
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 3,469 • Replies: 2
Topic Closed
No top replies

Tue 16 May, 2017 02:18 am

For that , you can use VBA to do that. Try the macro below

Sub ConvertTablesToPictures()
Dim objTable As Table
Dim objDoc As Document
Dim objParagraph As Paragraph
Dim nTable As Integer

Set objDoc = ActiveDocument
nTable = 0

With objDoc
For Each objParagraph In .Paragraphs
If objParagraph.Range.Style = "Caption" Then
End If
Next objParagraph

For Each objTable In .Tables

nTable = nTable + 1

objTable.Cell(1, 1).Range.InsertAfter "Table" & " " & nTable
objTable.Cell(1, 1).Range.Style = "Caption"

objTable.Rows(1).Cells.Borders.Enable = False
objTable.Rows(1).Cells.Borders(wdBorderBottom).LineStyle = wdLineStyleSingle


Selection.PasteSpecial Link:=False, dataType:=wdPasteEnhancedMetafile, _
Placement:=wdInLine, DisplayAsIcon:=False
Next objTable

End With

End Sub

0 Replies
Thu 16 Nov, 2023 02:11 pm
same problem, thank you
0 Replies

Related Topics

Microsoft Word - Question by gollum
A first look at Windows 7's UI - Discussion by Robert Gentel
MSN Groups Being Moved - Discussion by edgarblythe
Windows 11 and Disk Drives - Question by Brandon9000
Files Under Different Versions of Windows - Question by Brandon9000
My Windows 10 Computer Locked - Question by nyspurss
  1. Forums
  2. » batch change tables and their captions to pictures in Ms Word
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 03/05/2024 at 08:06:15