#1
|
|||
|
|||
Applying individual border sides to images when pasted into a table
Hello,
I have a strange issue with using VBA code to apply borders correctly to images, but only when the macros are applied to a screenshot within a table. In most cases it would be easiest to simply apply a border that simply surrounds a full image. Sadly in some cases I need to have only three sides of the image with borders leaving the fourth side blank (used to make two images side by side to appear as one single picture). The borders are assigned to an Inline Shape / Range object using four separate lines for top, bottom, right, left (example is condensed to shorten post): With Selection.Range .Borders(wdBorderTop).LineStyle = wdLineStyleSingle As long as I operate the macro on a screenshot in a blank word document I have no issues. However when the macro is applied to the screenshot while inside a table somehow the Border commands are applied to the table instead of the image. The border commands used to work in Word 2003 but some of the code appears to have been changed in Word 2010/2007? It is certainly possible that some of the border code was removed going into later versions of Word or maybe I am just missing something regarding a table format type. Reason being is that in Borders and Shading 2010 the borders have an Apply To: Text, Paragraph, Cell or Table option but no Picture option. Another thought is that there might be some kind of ignore function to temporarily ignore the table to get it to work. Please let me know if you have any ideas to apply individual sides of a border to an image (Inline Shape/ Range) when pasted into a table using Word 2010 (I would use 2003 if I could). Difficulty - three of four sides to a border. Thank you |
#2
|
||||
|
||||
Contrary to appearance, you can't apply individual borders to images. What you've been applying them to is the paragraph into which the images are being inserted. When you do that in a table and the image is anchored to an end-of-cell marker, the border gets applied to the table cell.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Table Border Behavior When Table Splits Across Pages | sarahmw0817 | Word | 1 | 01-22-2014 02:14 PM |
Heading row disappears from table styles when pasted table is selected | andrewballem | Word Tables | 2 | 11-12-2013 05:18 AM |
Aligning Page Border with Table border without losing formatting :mad: | l39linden | Word Tables | 5 | 10-04-2013 02:06 AM |
Excel adds a line to the top and left border of images upon re-open | ajpinto | Excel | 2 | 05-23-2011 06:10 AM |
Reduce file size of pasted images (Outlook new msg)? | Josh | Outlook | 2 | 12-01-2010 02:27 AM |