Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-31-2017, 09:48 AM
beyondimage beyondimage is offline Insert multiple images at once from a folder Windows 7 64bit Insert multiple images at once from a folder Office 2013
Novice
Insert multiple images at once from a folder
 
Join Date: Jan 2017
Posts: 1
beyondimage is on a distinguished road
Default Insert multiple images at once from a folder

Good morning everyone!



So I have taken this code from https://www.extendoffice.com/documen...-pictures.html as it should be seen below.

What I want to know is if anyone can help me with -

Having all the photos import across 'Row B', instead of in a column fashion.
And how to add the 'File Names' (i.e. excel_image2.jpg) of said images, above each of their image in 'Row A'.
Thanks for all the help ahead of time!

Code:
Sub InsertPictures()
'Update 20140513
Dim PicList() As Variant
Dim PicFormat As String
Dim Rng As Range
Dim sShape As Shape
On Error Resume Next
PicList = Application.GetOpenFilename(PicFormat, MultiSelect:=True)
xColIndex = Application.ActiveCell.Column
If IsArray(PicList) Then
    xRowIndex = Application.ActiveCell.Row
    For lLoop = LBound(PicList) To UBound(PicList)
        Set Rng = Cells(xRowIndex, xColIndex)
        Set sShape = ActiveSheet.Shapes.AddPicture(PicList(lLoop), msoFalse, msoCTrue, Rng.Left, Rng.Top, Rng.Width, Rng.Height)
        xRowIndex = xRowIndex + 1
    Next
End If
End Sub
Reply With Quote
  #2  
Old 02-01-2017, 12:58 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Insert multiple images at once from a folder Windows 7 64bit Insert multiple images at once from a folder Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Hi,
Please do not crosspost your question on multiple forums without including links here to the other threads on other forums
.

Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert multiple images at once from a folder Copy images from one folder to another saurabhlotankar Excel Programming 6 07-03-2015 05:34 AM
Insert multiple images at once from a folder Insert multiple images & controls into a document vanwijnen Word VBA 1 06-05-2015 06:16 AM
Insert multiple images at once from a folder Insert paragraph break before images jsoule Word VBA 3 02-25-2015 07:53 AM
Insert multiple images at once from a folder Insert different images to multiple labels Ravon Word 3 10-16-2014 01:13 PM
Insert multiple images at once from a folder Insert images with incrementallly-numbered filenames mqx Word VBA 4 11-13-2013 11:22 AM

Other Forums: Access Forums

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