Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-10-2022, 10:27 PM
atifsyed atifsyed is offline Need Help modifying code for inserting multiple images Windows 10 Need Help modifying code for inserting multiple images Office 2019
Novice
Need Help modifying code for inserting multiple images
 
Join Date: May 2022
Posts: 6
atifsyed is on a distinguished road
Default Need Help modifying code for inserting multiple images


The code in https://www.msofficeforums.com/word-...es-1-page.html is working fantastically but I need little help that I dont want to add Image 1, Image 2, Image 3 in start of below image line. I just want to add original image name in description in below pictures.
Reply With Quote
  #2  
Old 05-10-2022, 11:16 PM
macropod's Avatar
macropod macropod is offline Need Help modifying code for inserting multiple images Windows 10 Need Help modifying code for inserting multiple images Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

It is not clear what you mean - the code already adds the image names on the row below the pictures. Putting the names in the same cells as the pictures is liable to mess up the alignments.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 05-13-2022, 05:39 AM
atifsyed atifsyed is offline Need Help modifying code for inserting multiple images Windows 10 Need Help modifying code for inserting multiple images Office 2019
Novice
Need Help modifying code for inserting multiple images
 
Join Date: May 2022
Posts: 6
atifsyed is on a distinguished road
Default

Please look into this yellow color auto numbering. I dont want this numbers. I just want to add only photo real name only.
Attached Images
File Type: jpeg Demo image.jpeg (174.5 KB, 19 views)
Reply With Quote
  #4  
Old 05-13-2022, 03:16 PM
macropod's Avatar
macropod macropod is offline Need Help modifying code for inserting multiple images Windows 10 Need Help modifying code for inserting multiple images Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

As you will see, the picture you posted does not say 'Image 1, Image 2, Image 3' - it says Picture 1, Picture 2, Picture 3 (as part of the overall caption that includes the picture name.

Simply change:
ExcludeLabel:=False
to:
ExcludeLabel:=True
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 05-14-2022, 12:26 AM
atifsyed atifsyed is offline Need Help modifying code for inserting multiple images Windows 10 Need Help modifying code for inserting multiple images Office 2019
Novice
Need Help modifying code for inserting multiple images
 
Join Date: May 2022
Posts: 6
atifsyed is on a distinguished road
Default

One thing is more something wrong that is auto number 1,2 and so on. I just need only image name not serial number please...
Thanks
Attached Images
File Type: jpeg Demo image.jpeg (153.9 KB, 16 views)
Reply With Quote
  #6  
Old 05-15-2022, 06:23 PM
macropod's Avatar
macropod macropod is offline Need Help modifying code for inserting multiple images Windows 10 Need Help modifying code for inserting multiple images Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Change:
Code:
        'Get the Image name for the Caption
        StrTxt = Split(.SelectedItems(j), "\")(UBound(Split(.SelectedItems(j), "\")))
        StrTxt = ": " & Split(StrTxt, ".")(0)
        'Insert the Caption on the row below the picture
        With oTbl.Cell(r + 1, c).Range
          .InsertBefore vbCr
          .Characters.First.InsertCaption _
          Label:="Picture", Title:=StrTxt, _
          Position:=wdCaptionPositionBelow, ExcludeLabel:=False
          .Characters.First = vbNullString
          .Characters.Last.Previous = vbNullString
        End With
to:
Code:
        'Get the Image name for the Caption
        StrTxt = Split(Split(.SelectedItems(j), "\")(UBound(Split(.SelectedItems(j), "\"))), ".")(0)
        'Insert the Caption on the row below the picture
        oTbl.Cell(r + 1, c).Range.Text = StrTxt
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 05-16-2022, 05:13 AM
atifsyed atifsyed is offline Need Help modifying code for inserting multiple images Windows 10 Need Help modifying code for inserting multiple images Office 2019
Novice
Need Help modifying code for inserting multiple images
 
Join Date: May 2022
Posts: 6
atifsyed is on a distinguished road
Default

I need little more help. I want to fix auto row height with text limit where image description add. Good sign row height made manually (Which I want) & yellow highlight row is auto adding pictures with macro run command.
Bundle of thanks for this help....

Reply With Quote
  #8  
Old 05-16-2022, 07:02 AM
macropod's Avatar
macropod macropod is offline Need Help modifying code for inserting multiple images Windows 10 Need Help modifying code for inserting multiple images Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

The row heights for the captions are already fixed - at 0.5cm.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #9  
Old 05-17-2022, 07:31 PM
atifsyed atifsyed is offline Need Help modifying code for inserting multiple images Windows 10 Need Help modifying code for inserting multiple images Office 2019
Novice
Need Help modifying code for inserting multiple images
 
Join Date: May 2022
Posts: 6
atifsyed is on a distinguished road
Default

Bundle of thanks dear macropod
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help modifying code for inserting multiple images Inserting images into mailmerge labels Denise Word VBA 3 03-20-2022 02:39 PM
Need Help modifying code for inserting multiple images Need Help Modifying Code to print all fonts Catluvr Word VBA 2 12-01-2021 12:14 PM
Inserting images for printing EdGood Drawing and Graphics 2 01-16-2019 09:12 PM
Need Help modifying code for inserting multiple images Need help with modifying a replacing font VBA code- similar task but subtle change kissingfrogs2003 Word VBA 3 08-30-2016 11:42 AM
Need Help modifying code for inserting multiple images Word - inserting images sulasno Drawing and Graphics 4 04-09-2011 07:28 AM

Other Forums: Access Forums

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