Home > Back-end >  Delphi processing WORD document image batch processing
Delphi processing WORD document image batch processing

Time:09-29

WORD of batch processing image size macro statement for

Sub setpicsize1 () 'set the image size
Dim number n 'picture
On the Error Resume Next 'ignore Error
For n=1 To ActiveDocument. InlineShapes. Count 'InlineShapes type image
ActiveDocument. InlineShapes (n). Height=ActiveDocument. InlineShapes (n.) Height * 0.5 'set the picture Height is 400 px
ActiveDocument. InlineShapes (n.) Width=ActiveDocument. InlineShapes (n.) Width * 0.5 'set image Width 300 px
The Next n
End Sub

In the DELPHI written as

For n:=1 To WordApp. ActiveDocument. InlineShapes. Count the do
The begin
WordApp. ActiveDocument. InlineShapes (n.) Height:=100;//set the picture height is 400 px
WordApp. ActiveDocument. InlineShapes (n.) : Width=100;//set the image width 300 px
End

Why in the third line error InlineShapes not method? How should change?

  • Related