Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-26-2014, 08:43 PM
Duvdev Duvdev is offline Applying individual border sides to images when pasted into a table Windows 7 64bit Applying individual border sides to images when pasted into a table Office 2010 64bit
Novice
Applying individual border sides to images when pasted into a table
 
Join Date: Mar 2014
Posts: 4
Duvdev is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 03-27-2014, 03:12 AM
macropod's Avatar
macropod macropod is offline Applying individual border sides to images when pasted into a table Windows 7 32bit Applying individual border sides to images when pasted into a table Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply

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
Applying individual border sides to images when pasted into a table Heading row disappears from table styles when pasted table is selected andrewballem Word Tables 2 11-12-2013 05:18 AM
Applying individual border sides to images when pasted into a table Aligning Page Border with Table border without losing formatting :mad: l39linden Word Tables 5 10-04-2013 02:06 AM
Applying individual border sides to images when pasted into a table Excel adds a line to the top and left border of images upon re-open ajpinto Excel 2 05-23-2011 06:10 AM
Applying individual border sides to images when pasted into a table Reduce file size of pasted images (Outlook new msg)? Josh Outlook 2 12-01-2010 02:27 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:57 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft