oWord=CREATEOBJECT("Word.Application") WITH oWord .Visible=.T. .WindowState = wdWindowStateMaximize .Documents.Add("f:\contacts\docs\test.dot") .ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader .Selection.InlineShapes.AddPicture FileName:="F:\Contacts\Graphics\ACERO1.BMP"_ ,LinkToFile:=False, SaveWithDocument:=True .Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter ENDWITHWhen I run this code I am getting a syntax error on the following portion:
.Selection.InlineShapes.AddPicture FileName:="F:\Contacts\Graphics\ACERO.BMP"_ ,LinkToFile:=False, SaveWithDocument:=TrueI recorded a macro in Word while inserting the image into the header and this is the code hat it produced. What am I doing wrong? Any help would be greatly appreciated.
.Selection.InlineShapes.AddPicture("F:\Contacts\Graphics\ACERO.BMP",.F., .T.)HTH