word vba question

T

Ted

Hi all, I'm not sure if this is the right place for this but I'm trying to
add a picture to a word document thru code in access 2007

when i run the following code i get Method or Data Member not found


Dim myshape As InlineShape
Set myshape =
Selection.InlineShapes.AddPicture(FileName:="O:\Signature.jpg",
LinkToFile:=False, SaveWithDocument:=True)

With myshape
.WrapFormat.Type = wdWrapNone
End With

I'm creating a document on the fly with access and I'm trying to add a
signature.

I cannot get the WrapFormat to work. Am I missing a reference somewhere?

I have Microsoft Word 12.0 Object Libray and Microsoft Office 12.0 Object
Library
 
D

Doug Robbins - Word MVP

Use:

Dim myinlineshape As InlineShape
Dim myshape As Shape
Set myinlineshape =
Selection.InlineShapes.AddPicture(filename:="C:\Users\Doug\Pictures\Tiling\P5020372.jpg",
LinkToFile:=False, SaveWithDocument:=True)
Set myshape = myinlineshape.ConvertToShape
With myshape.WrapFormat
.Type = wdWrapNone
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top