killercrossover
Programmer
here the problem i get this error "Run-time error'449': Argument not optional" on line in red
***************code****************************************
Sub NewCanvasPicture()
Dim shpCanvas As Shape
Dim pic As String
pic = "D:\Documents and_ Settings\kspencer\Desktop\Sample.jpg"
'Add a drawing canvas to the active document
Set shpCanvas = ActiveDocument.Shapes.AddCanvas(Left:=100, Top:=75, Width:=200, Height:=300)
'Add a graphic to the drawing canvas
shpCanvas.CanvasItems.AddPicture Filename:=pic, LinkToFile:=False, SaveWithDocument:=True
End Sub
**********************code*********************************
Selection.InlineShapes.AddPicture Filename:=pic, LinkToFile:=False, SaveWithDocument:=True
if i use this line of code in place of the one in red it put the pic on the word doc but not in the drawing canvas. im really trying to is insert a pic on a word to specific location on a form that i got a marco make for me.
***************code****************************************
Sub NewCanvasPicture()
Dim shpCanvas As Shape
Dim pic As String
pic = "D:\Documents and_ Settings\kspencer\Desktop\Sample.jpg"
'Add a drawing canvas to the active document
Set shpCanvas = ActiveDocument.Shapes.AddCanvas(Left:=100, Top:=75, Width:=200, Height:=300)
'Add a graphic to the drawing canvas
shpCanvas.CanvasItems.AddPicture Filename:=pic, LinkToFile:=False, SaveWithDocument:=True
End Sub
**********************code*********************************
Selection.InlineShapes.AddPicture Filename:=pic, LinkToFile:=False, SaveWithDocument:=True
if i use this line of code in place of the one in red it put the pic on the word doc but not in the drawing canvas. im really trying to is insert a pic on a word to specific location on a form that i got a marco make for me.