Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-02-2018, 08:01 AM
Grahamers2002 Grahamers2002 is offline Pasting Image inside Table and Resize Image Not Working Windows 10 Pasting Image inside Table and Resize Image Not Working Office 2016
Novice
Pasting Image inside Table and Resize Image Not Working
 
Join Date: Jul 2018
Posts: 3
Grahamers2002 is on a distinguished road
Default Pasting Image inside Table and Resize Image Not Working

I use the code listed at the end of this post to paste images into Word and resize them. It works fine EXCEPT when I try to use it inside a table cell. When it executes inside a cell, the image is pasted but not resized.



I suspect that the Selection.Start = .Start - 1 is the problem but I don't know how to fix for this issue.

Any help would be greatly appreciated!

Sub FormatCard()
With Selection
.PasteAndFormat (wdPasteDefault) 'Pastes in the content
.Start = .Start - 1 'move the start back one postion to include the image
If .InlineShapes.Count = 1 Then
'resize the image
With .InlineShapes(1)
.Width = InchesToPoints(2.54)
.Height = InchesToPoints(3.47)
.LockAspectRatio = True
End With
End If
End With
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pasting Image inside Table and Resize Image Not Working Word - Resize image to specified selected cells' dimensions FaizanRoshan Word VBA 7 10-18-2015 03:34 PM
Insert and resize image lenguyenleduong Word VBA 2 05-11-2014 07:23 AM
Shortcut for image resize Hatthans PowerPoint 0 01-06-2014 04:32 PM
How to resize the image in the header so that it fits the page Isadora Excel 1 08-20-2013 06:02 AM
Image proportional resize not functioning! alexfcm PowerPoint 0 09-27-2012 07:22 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:52 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