I may not be explaining myself very well. I know what I need to do but i
can't get the correct code to do that.
I am a bit of a bumbler when it comes to code. Was wondering if anyone could
help with the code. Currently this is what I have:
Sub pastepicture()
Selection.Collapse Direction:=wdCollapseStart
Selection.Range.PasteSpecial DataType:=wdPasteInlineShape
End Sub
and it is floating over text.
Where is the picture coming from? If it's from a file, use something like
ActiveDocument.InlineShapes.Addpicture FileName:="c:\....", Range:=Selection
>I may not be explaining myself very well. I know what I need to do but i
> can't get the correct code to do that.
[quoted text clipped - 21 lines]
>> > doing
>> > that?
Susan B. Quinn - 04 Apr 2006 01:11 GMT
OK. Let's start at the beginning. I want to write a macro that:
1. Pastes the content of the clipboard into the document as a picture
(enhanced metafile) The content is always text from another Word document.
2. Makes the resulting picture sit inline with text.
So far I have managed to write code that drops the text in as a picture. But
I can't work out how to make it then change to being inline with text.
This is the code I have so far:
Sub pastepicture()
> > Selection.Collapse Direction:=wdCollapseStart
> > Selection.Range.PasteSpecial DataType:=wdPasteInlineShape
> >
> > End Sub
I currently have my options set in Word to insert all pictures in as "In
Line With Text"
This does not always work with pastespecial from the clipboard.
Susan
> Where is the picture coming from? If it's from a file, use something like
>
[quoted text clipped - 25 lines]
> >> > doing
> >> > that?