Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word Doc size doubles when a page break put after Forms.Image

Status
Not open for further replies.

harshad75

Programmer
May 10, 2002
1
GB
Hi

I have a macro in word 97 which loads an image into Forms.Image control (MS Forms 2.0 mf20.dll).
It works fine. I can save the doc.

But later if I press ENTER after image and save the document then size of .doc file doubles. Even if I insert page break, it doubles.

Later if I remove page break, size does not change.

The macros is
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.ParagraphFormat.SpaceBefore = 6

Set objInlineShape = ActiveDocument.InlineShapes.AddOLEControl(Range:=Selection.Range, _
ClassType:="Forms.Image.1")
Set objImage = objInlineShape.OLEFormat.Object

objInlineShape.Width = InchesToPoints(10)
objInlineShape.Height = InchesToPoints(6)
objImage.PictureSizeMode = fmPictureSizeModeZoom
objImage.Enabled = False
objImage.BackColor = RGB(255, 255, 255)
objImage.BorderStyle = fmBorderStyleNone

objImage.Picture = LoadPicture("C:\Image.bmp")


Any suggestions ?

Harshad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top