#DEFINE wdOrientLandscape 1 #DEFINE wdSectionBreakNextPage 2 oWord = CREATEOBJECT('word.application') && create the word object oWord.documents.ADD("C:\normal.dot",.T.) && add document using template, make it new oWord.VISIBLE = .T. WITH oWord.SELECTION .typetext("Testing") .typeparagraph .typeparagraph .typeparagraph oWord.ActiveDocument.RANGE(.Start, .Start).InsertBreak(wdSectionBreakNextPage) .Start = .Start + 1 WITH oWord.ActiveDocument.RANGE(.Start, oWord.ActiveDocument.Content.END).PageSetup .ORIENTATION = wdOrientLandscape ENDWITH *Set Img = ActiveDocument.Shapes.AddOLEControl("Forms.Image.1", 0, 9, 648, 414, Selection.Range) Img = oWord.ActiveDocument.Shapes.AddOLEControl("Forms.Image.1", 0, 9, 648, 414, .RANGE) *ActiveDocument.Shapes.AddOLEControl Anchor:=Selection.Range,ClassType:="Forms.Image.1" *Set Img = ActiveDocument.Shapes.Item(1) WITH Img.OLEFormat.OBJECT .PictureSizeMode = 3 .LEFT = 0 .TOP = 9 .HEIGHT = 414 .WIDTH = 648 .BACKCOLOR = RGB(255,255,255) .BORDERCOLOR = RGB(255,255,255) .picture = loadpicture("c:\Image.jpg") * .picture(loadpicture("c:\image.jpg")) * oImgList = createobject("COMCTL.ImageListCtrl.1") * oImgList.ListImages.Add(,,loadpicture("c:\image.jpg")) * .picture = oImgList.ListImages(1).picture ** opicture = oImgList.ListImages(1).picture ** .Picture(oPicture) ** .picture = oPicture * oform = createobject("form") * set classlib to formimg.vcx additive * oform.addobject("oImg","FormImg") * release classlib forming * oform.oImg.Picture = LoadPicture("c:image.jpg") * oform.visible = .t. * oform.oimg.visible = .t. * wait * .picture = oform.oimg.picture ENDWITH ENDWITH WAIT RELEASE oWord release opicture release oimglist release oform