Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-20-2020, 03:09 AM
Ethen5155 Ethen5155 is offline Link images to their names at table cells Windows 10 Link images to their names at table cells Office 2016
Novice
Link images to their names at table cells
 
Join Date: Nov 2019
Posts: 5
Ethen5155 is on a distinguished road
Default Link images to their names at table cells

Hello dears, hope you are all doing safe and sound!

i'm trying to find a way to insert images from links folder to word table and to be aligned with their names

Before:



After:




i'm also attaching sample files for before and after along with links folder



any help will be highly appreciated here

Thanks in advance


Cross-posting link
Attached Files
File Type: zip Sample.zip (193.8 KB, 10 views)
Reply With Quote
  #2  
Old 10-20-2020, 08:34 AM
Charles Kenyon Charles Kenyon is offline Link images to their names at table cells Windows 10 Link images to their names at table cells Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,082
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

I suspect you wanted some images for before and after in your post. You can edit it. It would be the same process you used for your sample.zip.
How to attach a screenshot or file in this forum.

You could then place your insertion point in the post to position the images.
Reply With Quote
  #3  
Old 10-20-2020, 08:56 AM
Ethen5155 Ethen5155 is offline Link images to their names at table cells Windows 10 Link images to their names at table cells Office 2016
Novice
Link images to their names at table cells
 
Join Date: Nov 2019
Posts: 5
Ethen5155 is on a distinguished road
Default

sorry but i didn't get your point,

i have already inserted screenshots at the post to explain my request and the sample files are for testing the code to be sure it works well before posting it here.
Reply With Quote
  #4  
Old 10-20-2020, 02:02 PM
Charles Kenyon Charles Kenyon is offline Link images to their names at table cells Windows 10 Link images to their names at table cells Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,082
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

I'm not understanding the point of Before and After in your post if not to show images.
Quote:
i'm trying to find a way to insert images from links folder to word table and to be aligned with their names

Before:



After:




i'm also attaching sample files for before and after along with links folder
Reply With Quote
  #5  
Old 10-23-2020, 02:11 AM
Ethen5155 Ethen5155 is offline Link images to their names at table cells Windows 10 Link images to their names at table cells Office 2016
Novice
Link images to their names at table cells
 
Join Date: Nov 2019
Posts: 5
Ethen5155 is on a distinguished road
Default

Thanks to José Augusto

Solved

Code:
Sub LinkImagesToTable()
'
Dim File_Path As String, Image_Path As String, Image_Name As String, Image_Aux As String, Row_i As Integer
On Error Resume Next
File_Path = ActiveDocument.Path
Image_Path = File_Path & "\Links"
    For Row_i = 2 To ActiveDocument.Tables(1).Rows.Count
        Image_Aux = ActiveDocument.Tables(1).Cell(Row_i, 1).Range
        Image_Name = Trim(Left(Image_Aux, Len(Image_Aux) - 2) & ".jpg")
        ActiveDocument.Tables(1).Cell(Row_i, 2).Select
        Selection.Range = ""
        ActiveDocument.Shapes.AddPicture(Anchor:=Selection.Range, FileName:= _
            Image_Path & "\" & Image_Name, _
            LinkToFile:=True, SaveWithDocument:=True).WrapFormat.Type = wdWrapSquare
        DoEvents
    Next Row_i
    For Row_i = 1 To ActiveDocument.Shapes.Count
        With ActiveDocument.Shapes(Row_i)
            .RelativeHorizontalPosition = 2
            .RelativeVerticalPosition = 1
            .Top = 0
        End With
        DoEvents
    Next Row_i
End Sub
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Link images to their names at table cells How to link images by default when dragging images in word maxbaeten Drawing and Graphics 3 09-27-2017 11:34 PM
Link images to their names at table cells Opening all selected images, resizing images and placing them into a table. John Livewire Word VBA 1 09-15-2017 11:24 PM
Link cells in word doc (table) to update from 2 separate docs - can this be done? larrens Word 3 09-15-2014 11:20 PM
exporting images with correct file names lister PowerPoint 1 03-12-2014 12:27 AM
Link images to their names at table cells Share your tips for centering images in table cells WaltR Word 4 01-29-2011 11:22 PM

Other Forums: Access Forums

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


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