#1
|
|||
|
|||
Adding a oval shape in word and pasting image into it from clipboard
hey guys, as title says.
im trying to create an oval shape in word vba and pasting an image to it from clipboard. managed to get it working with filedialog. but i wanted to do so with image copied to clipboard, as it possible via regular shape adding in word. any ideas how to do so ? using office 2010 btw. thx |
#2
|
||||
|
||||
How about
Code:
Dim oShape As Shape Set oShape = ActiveDocument.Shapes.AddShape(msoShapeOval, 50, 50, 400, 300) oShape.Fill.ForeColor = &HFFFFFF oShape.TextFrame.TextRange.Paste
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
it pasted it in the middle , not like a fish eye as it suppose do.
this is how it looks like with the code |
#4
|
||||
|
||||
Word can't turn a rectangular image into a fish-eye version by merely pasting it into an oval. You should use a graphics program for that. AFAIK the best Word can do when inserting a rectangular image into an oval is to crop the parts of the image that don't fit, so you get an oval-shaped image. Naturally, this will result in parts of the image not appearing, even though they're present.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
||||
|
||||
You would have to save the image as a file in order to use it as a shape fill.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#6
|
|||
|
|||
tho its possible pasting from clipboard via filling menu in shape design, i guess its not possible codewize.
thx guys for replying. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Copied shape/text box pastes as an image in Word | spectator | Word | 0 | 06-04-2014 08:45 AM |
Shift key is pasting from clipboard...WHY? | nc1105 | Word | 2 | 01-02-2014 11:57 PM |
Excel vba adding field in word table/shape in a header | Hdr | Excel | 1 | 02-04-2013 04:40 PM |
Pasting image captured with a java program 'on to clipboard' into MSWord 2007 is blur | tarunkumarreddy | Word | 0 | 02-03-2012 09:42 PM |
Adding Image into a excel cell and adding a hyperlink to the image | saravananiyyanar | Excel | 3 | 05-04-2011 08:31 AM |