Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2006

Tip: Looking for answers? Try searching our database.

Paste text as inline picture/shape

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Susan B. Quinn - 03 Apr 2006 05:42 GMT
I have managed to write a macro for inserting text as a picture but I wanted
the picture to automatically sit inline with text. How would I go about doing
that?
Jezebel - 03 Apr 2006 06:05 GMT
If you insert it as an InlineShape (as opposed to a Shape), inline is how it
will be.

>I have managed to write a macro for inserting text as a picture but I
>wanted
> the picture to automatically sit inline with text. How would I go about
> doing
> that?
Susan B. Quinn - 03 Apr 2006 06:40 GMT
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.

> If you insert it as an InlineShape (as opposed to a Shape), inline is how it
> will be.
[quoted text clipped - 4 lines]
> > doing
> > that?
Jezebel - 03 Apr 2006 08:09 GMT
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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.