Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-23-2024, 05:15 AM
maput maput is offline how to have fixed nested table size when pasting image Windows 11 how to have fixed nested table size when pasting image Office 2021
Novice
how to have fixed nested table size when pasting image
 
Join Date: Nov 2024
Posts: 2
maput is on a distinguished road
Default how to have fixed nested table size when pasting image

Hi,

I am new here. So I am having trouble with put (copy paste or drag & drop) an image/ photos into nested table.
I set up fixed size for nested table so image will fit into table without stretching the table. But it does not work. I could not find any solving for this problem. (see 185548.png)

On external table (not nested) it is very easy to paste an image into table without stretching the table (see image 185811.png). Could not find my way how to that at nested table.



Also when i click the image after resizing its to fit the table the edge boundary is different with image inside external table where i can drag & drop or copy paste without stretching the tables.

Appreciate for any one who reply the thread.

Thank You
Attached Images
File Type: jpg Screenshot 2024-11-23 185548.jpg (79.6 KB, 14 views)
File Type: png Screenshot 2024-11-23 185811.png (150.7 KB, 15 views)

Last edited by Charles Kenyon; 11-23-2024 at 10:58 AM. Reason: formatting
Reply With Quote
  #2  
Old 11-23-2024, 09:52 PM
macropod's Avatar
macropod macropod is offline how to have fixed nested table size when pasting image Windows 10 how to have fixed nested table size when pasting image Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,359
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

To restrict the Row height, you need to set the 'exact' height property via to Table Properties dialog:
Attached Images
File Type: png TblRow.png (9.0 KB, 12 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 11-23-2024, 11:18 PM
maput maput is offline how to have fixed nested table size when pasting image Windows 11 how to have fixed nested table size when pasting image Office 2021
Novice
how to have fixed nested table size when pasting image
 
Join Date: Nov 2024
Posts: 2
maput is on a distinguished road
Default

the height is not problem. It stay 2.5 as the input into row tab.

Problem is with width. The image wont fit into nested table size (width=3.5, height=2.5). the width goes stretching once i drag/ paste image including insert.
see different image top and bottom.


Top image require to be set manually width so it can fit into table size.
Attached Images
File Type: jpg Screenshot 2024-11-24 130420.jpg (52.9 KB, 12 views)
Reply With Quote
  #4  
Old 11-24-2024, 02:20 PM
macropod's Avatar
macropod macropod is offline how to have fixed nested table size when pasting image Windows 10 how to have fixed nested table size when pasting image Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,359
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

OK, make sure you have set the preferred width for the nested table and its column to however many inches/centimeters you require.

Then, for the cell, check the 'fit text' property. This will stop the cell expanding but may result in parts of pictures that are wider than the cell when fitted to the row height disappearing. The following macro will correct such images after they're inserted.

You can select either a single cell or a whole table for processing - which means to can leave the resizing till the end.

Fiddling with the 'fit text' property isn't really necessary, but it prevents the rest of the parent cell's layout being messed with before the macro is run.

Code:
Sub FitPics()
Dim Tbl As Table, TblCl As Cell, Cell As Cell, i As Long, sWdth As Single
With Selection
  If .Information(wdWithInTable) = False Then Exit Sub
  For Each Cell In .Cells
    With Cell
      sWdth = .PreferredWidth
      For i = 1 To .Range.InlineShapes.Count
        With .Range.InlineShapes(i)
          .LockAspectRatio = True
          If .Width > sWdth Then .Width = sWdth
        End With
      Next
    End With
    For Each Tbl In Cell.Tables
      For Each TblCl In Tbl.Range.Cells
        With TblCl
          sWdth = .PreferredWidth
          For i = 1 To .Range.InlineShapes.Count
            With .Range.InlineShapes(i)
              .LockAspectRatio = True
              If .Width > sWdth Then .Width = sWdth
            End With
          Next
        End With
      Next
    Next
  Next
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pasting an image from another PPT file shrinks some text on the page to a smaller size. Why? User1 PowerPoint 0 12-15-2022 08:26 AM
how to have fixed nested table size when pasting image Pasting Image inside Table and Resize Image Not Working Grahamers2002 Drawing and Graphics 5 07-02-2018 04:49 PM
userform fixed size string Vibov Excel 0 03-07-2015 04:27 AM
copying nested if over multiple rows where one value stays fixed charles_cat Excel 1 01-23-2015 01:30 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:01 PM.


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