Home > OS >  How to batch set to embedded pictures in Word document
How to batch set to embedded pictures in Word document

Time:01-26

My a word2016 document contains 30 a few images, is joined by the program automatically, text format is floating in the images above, I think the image format bulk changes into embedded format, then wrote a VBA macros to deal with, but every time after executing macro, there are always a few picture format can't modify success, but the other can, have several days, I couldn't succeed, hope to get help, thank you, the code is as follows:

Sub ConvertThem ()
Dim oShape As Shape
On the Error Resume Next
For Each oShape In ActiveDocument. Shapes
OShape. Select
OShape. ConvertToInlineShape
Selection. Range. ParagraphFormat. Alignment=wdAlignParagraphCenter
Next
End Sub

CodePudding user response:

File leaving only then one or two such, ok? Manual is not possible, can you do that? Can be converted into statements breakpoints, up and down, to see if run to here,

CodePudding user response:

reference 1/f, zara's reply:
file leaving only then one or two such, ok? Manual is not possible, can you do that? Can be converted into statements breakpoints, up and down, to see if run to here, the

Each had to perform a two or three times, to put all the pictures

CodePudding user response:

That is a bit difficult, or can be put On the Error Resume Next statement annotations for a while, when something goes wrong stop to look at the Error description; Estimated earnings not big,
Or, outside the For statement to add a While.. Shapes. Count & gt; 0 automatically to try on a few rounds?

CodePudding user response:

Zara
reference 3 floor response:
that is somewhat difficult, or can be put On the Error Resume Next statement annotations for a while, when something goes wrong stop to look at the Error description; Estimated earnings not big,
Or, outside the For statement to add a While.. Shapes. Count & gt; 0 automatically to try on a few rounds?

Okay, I try again, thank you!
  • Related