B
BRC
Hi All,
I put a post about this problem up yesterday but I think I may not
have been to clear about the problem and what I was trying to do. I
have resolved most of my problems but I still have an issue with the
code below. When I run this in Word 2003 it works perfectly and
inserts a picture into the document at the cursor location. However,
when I try it in Word 2007 I get an error that says “The method or
Property is not available because the current selection is not a
graphic”. (I am trying to insert a photo usually a jpeg.). The
debugger highlights the line **With Dialogs(wdDialogFormatPicture)**
Obviously I user of both 2003 and 2007 versions of Word. Any advice
would be greatly appreciated.
**********************************************
Sub InsertPic()
'
If Dialogs(wdDialogInsertPicture).Show <> 0 Then
'''resizes the shape
Selection.Paragraphs(1).Range.InlineShapes(1).Select
With Dialogs(wdDialogFormatPicture)
.ScaleX = 28
.ScaleY = 18
.Execute
End With
End If
End Sub
*********************************************
I put a post about this problem up yesterday but I think I may not
have been to clear about the problem and what I was trying to do. I
have resolved most of my problems but I still have an issue with the
code below. When I run this in Word 2003 it works perfectly and
inserts a picture into the document at the cursor location. However,
when I try it in Word 2007 I get an error that says “The method or
Property is not available because the current selection is not a
graphic”. (I am trying to insert a photo usually a jpeg.). The
debugger highlights the line **With Dialogs(wdDialogFormatPicture)**
Obviously I user of both 2003 and 2007 versions of Word. Any advice
would be greatly appreciated.
**********************************************
Sub InsertPic()
'
If Dialogs(wdDialogInsertPicture).Show <> 0 Then
'''resizes the shape
Selection.Paragraphs(1).Range.InlineShapes(1).Select
With Dialogs(wdDialogFormatPicture)
.ScaleX = 28
.ScaleY = 18
.Execute
End With
End If
End Sub
*********************************************