Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-28-2013, 01:12 PM
2whldreams 2whldreams is offline Insert mutliple digital images on one page Windows Vista Insert mutliple digital images on one page Office 2007
Novice
Insert mutliple digital images on one page
 
Join Date: Apr 2013
Posts: 1
2whldreams is on a distinguished road
Default Insert mutliple digital images on one page

Greetings. Thank you in advance for viewing my question.



The goal is to take 4 digital images from my file and insert onto one page. Preferably with no border.

I can insert one image easy enough, but the second image defaults to a second page.

Supposedly the image can be moved about with a left drag of the mouse but my efforts result in no movement.
Reply With Quote
  #2  
Old 04-28-2013, 04:01 PM
macropod's Avatar
macropod macropod is offline Insert mutliple digital images on one page Windows 7 64bit Insert mutliple digital images on one page 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

See: https://www.msofficeforums.com/drawi...ument-all.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 11-08-2018, 05:08 AM
bomberboy bomberboy is offline Insert mutliple digital images on one page Windows 10 Insert mutliple digital images on one page Office 2016
Novice
 
Join Date: Nov 2018
Location: Australia
Posts: 1
bomberboy is on a distinguished road
Default

I have been looking for this code for so long.

This will literally save me hours and hours of work as I have over 300 photos to tabulate.
Reply With Quote
  #4  
Old 11-12-2018, 12:29 PM
Dorin38 Dorin38 is offline Insert mutliple digital images on one page Windows 7 64bit Insert mutliple digital images on one page Office 2010
Novice
 
Join Date: Nov 2018
Posts: 2
Dorin38 is on a distinguished road
Default Hello.

Hello everyone, thank you macropod for this macro it is very usefull for me at work. Do you think this macro can be improved, as to autocorrect the captions under the photos inserted if you delete one photo?
What i mean is that if i insert 4 photos and i delete photo 3, the captions under the remaining photos to be in order and photo 4 caption to be automatically deleted.
Reply With Quote
  #5  
Old 11-12-2018, 03:18 PM
macropod's Avatar
macropod macropod is offline Insert mutliple digital images on one page Windows 7 64bit Insert mutliple digital images on one page 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

Since the macro concerns only the insertion of images, not their deletion, the simple answer is: no.

However, if you were to use a multicolumn page layout for wherever you want the pics to appear, together with a specification that there should only be one image per column, deleting an image and its caption will result in all the others updating correctly with no blank cells. Do be aware, though, that this changes the layout from across-then-down to down-then-across.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 07-13-2020, 05:09 AM
Matt32258 Matt32258 is offline Insert mutliple digital images on one page Windows 10 Insert mutliple digital images on one page Office 2019
Novice
 
Join Date: Jul 2020
Posts: 1
Matt32258 is on a distinguished road
Default

Dear Macropod, thank you for the well thought out VBA code. Unfortunately I experienced and error when attempting to run the macro routine. I am hoping that someone might offer advice in diagnosis the cause of the error.
The error message is: Run-time error '4605':
This method or property is not available because this command is not available inside math.
The command line where this occurred:
Set oTbl = Selection.Tables.Add(Range:=Selection.Range, NumRows:=2, NumColumns:=NumCols)

Thank you everyone. Cheers/M
Reply With Quote
  #7  
Old 07-13-2020, 04:05 PM
Guessed's Avatar
Guessed Guessed is offline Insert mutliple digital images on one page Windows 10 Insert mutliple digital images on one page Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

NumCols should be an Integer that you entered in an inputbox. It is defined as Long so conceivably you are not putting an Integer in as the input value.

What are you seeing if you hover over the word NumCols when that line is being debugged?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #8  
Old 07-14-2020, 02:54 PM
eduzs eduzs is offline Insert mutliple digital images on one page Windows 10 Insert mutliple digital images on one page Office 2019
Expert
 
Join Date: May 2017
Posts: 260
eduzs is on a distinguished road
Default

Hi! Thanks!
There is a way to use the maximum available page area instead of asking for the maximum picture height? Considering a given number of rows and columns (pictures) per page.
Reply With Quote
  #9  
Old 11-06-2020, 10:46 AM
Mitchell.Odom Mitchell.Odom is offline Insert mutliple digital images on one page Windows 10 Insert mutliple digital images on one page Office 2013
Novice
 
Join Date: Nov 2020
Posts: 2
Mitchell.Odom is on a distinguished road
Default

Hi Macropod,

I name my pictures 001, 002, 003, etc. because they have to be in a certain order. When I run the program that you provided it inserts the file name into the row, but adds Picture 1:, Picture 2: etc. in front of the file name. is there a way to remove this part in the macro?
Reply With Quote
  #10  
Old 11-06-2020, 01:45 PM
macropod's Avatar
macropod macropod is offline Insert mutliple digital images on one page Windows 10 Insert mutliple digital images on one page Office 2010
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

You could change:
Code:
        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:
        oTbl.Cell(r + 1, c).Range.Text =StrTxt
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #11  
Old 11-13-2020, 06:03 PM
Mitchell.Odom Mitchell.Odom is offline Insert mutliple digital images on one page Windows 10 Insert mutliple digital images on one page Office 2013
Novice
 
Join Date: Nov 2020
Posts: 2
Mitchell.Odom is on a distinguished road
Default

Thank you Macropod!
Reply With Quote
  #12  
Old 04-29-2021, 08:40 AM
MSffcfrmsusr MSffcfrmsusr is offline Insert mutliple digital images on one page Windows 10 Insert mutliple digital images on one page Office 2010
Novice
 
Join Date: Apr 2021
Posts: 1
MSffcfrmsusr is on a distinguished road
Thumbs up

Your whole solution is utterly elegant. You've just saved me hours. and hours. of work and pain and exasperation. Thank you more than there are words to express.
Reply With Quote
  #13  
Old 08-04-2021, 07:05 AM
SLWR92 SLWR92 is offline Insert mutliple digital images on one page Windows 10 Insert mutliple digital images on one page Office 2019
Novice
 
Join Date: Aug 2021
Posts: 1
SLWR92 is on a distinguished road
Default

Hello, this has saved me soooooo much time so thank you very much!! Can I ask, how would I remove the caption completely? I need the row but to insert my own text. Also, is there a way to number each blank row in every column? So if I have 2 columns per row have them showing as 1. 2. 3. etc?
Reply With Quote
  #14  
Old 10-21-2021, 05:05 AM
RedZed1100 RedZed1100 is offline Insert mutliple digital images on one page Windows 10 Insert mutliple digital images on one page Office 2016
Novice
 
Join Date: Aug 2020
Location: England
Posts: 8
RedZed1100 is on a distinguished road
Thumbs up

Great stuff. Just what I was looking for.
Reply With Quote
  #15  
Old 01-21-2022, 05:11 PM
mathemagician44 mathemagician44 is offline Insert mutliple digital images on one page Windows 11 Insert mutliple digital images on one page Office 2019
Novice
 
Join Date: Jan 2022
Posts: 5
mathemagician44 is on a distinguished road
Default

This is great. I truly thank you for posting this. This will improve my efficiencies in multiple ways.

Can anyone help explain how I'd change the font size and type throughout the photos that this adds (nothing else in the document). If we could justify the captions to wrap a new line at the width of the photos that would be extra great.

I will ultimately change the code to always use a vertical picture height of 9 cm.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to insert and hide images ricecrispies Excel 8 06-18-2022 04:19 AM
Mutliple Selection List Box tbrynard01 Word 0 09-10-2019 12:56 PM
Insert images into word form lfabiof Word VBA 1 12-24-2017 09:51 PM
Programmatically insert digital signature into a Word document tinamanns Word 0 04-12-2017 01:16 PM
Insert mutliple digital images on one page Mutliple copies 167 print as one document John-N Mail Merge 5 02-19-2012 07:15 PM

Other Forums: Access Forums

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