Free Support Forum -

Classic ASP InsertImage Overloads help

# Then you need to use the DocumentBuilder.InsertImage(Image,

RelativeHorizontalPosition, # Double, RelativeVerticalPosition, Double,


Double, WrapType, WrapSide, Boolean, PictureFormat) overload method. Set WrapType

and WrapSide to control image alignment and text wrapping.

I am trying to convert:

Builder.InsertImage("myimage.jpg", (a)RelativeHorizontalPosition.Margin, 100, (b)RelativeVerticalPosition.Margin, 100, 200, 100, (c)WrapType.Square, (d)WrapSide.Both, False, Nothing)

To the Classic ASP overloads method:

Builder.InsertImage_2 "
myimage.jpg", (a)0, 100, (b)0, 100, 200, 100, (c)2, (d)0, False, Nothing

I replaced the text with actual enumeration values
(a) RelativeHorizontalPosition_Margin = 0
(b) RelativeVerticalPosition_Margin = 0
(c) WrapType.Square = 2
(d) WrapSide.Both = 0

I'm getting an error saying that InsertImage_2 is not being used properly. Is my code totally wrong?

The “_2” and other suffixes are added by the COM Interop. There are 6 overloads for the InsertImage method with suffixes from “_2” to “_6” plus one without a suffix. I’m not 100% sure which suffix goes to which method, but I guess if you open Aspose.Words.dll in Reflector and see the list of methods you will get the correct idea. The overload you need comes 5th in the list so I guess it should be InsertImage_5 for this signature.

I figured it out, this works now:

Builder.InsertImage_6 “
myimage.jpg”, 0, 100, 0, 100, 200, 100, 2, 0, False, Nothing

it’s “_6” for this type of signature