Full feature free trial 60-day, no credit card required! See How Kutools For Excel Save Your Time In Excel 2019 / 2016 / 2013 / 2010 / 2007 / Office 365 Undoubtedly, this powerful and user-friendly add-in will save Excel users a mass of working time and greatly improve working efficiency. For example, Excel users can easily combine worksheets with several clicks, merge cells without losing data, paste to only visible cells, and so on. XStr = Mid(xArr(I, 1), InStrRev(xArr(I, 1), ".Kutools for Excel is a handy Excel add-in with more than 300 advanced features to simplify various kinds of complicated tasks into a few clicks in Microsoft Excel.
#KUTOOLS FOR EXCEL 2016 IMPORT PICTURES CODE#
May be the below vba code can help you to extract the iimages and rename them wihtout the subfix number, please try. URLDownloadToFile 0, xArr(I, 1), xFdItem & "\" & xArr(I, 2) & I & xStr, 0, 0 Set xFd = Application.FileDialog(msoFileDialogFolderPicker) Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long Note: Column A contains the URL addresses and Column B has the new names. To save the URL'S images into a folder and rename them with the new names in Column B, may be the following VBA code can help you: Set xRg = Application.InputBox("Please select a cell to put the image:", "KuTools for excel",, ,, ,, 8) Set Rng = Application.InputBox("Please select the url cells:", "KuTools for excel", Selection.Address,, ,, , 8) To put the images to any other cells as you want, please apply the following VBA code: Set xRg = Application.InputBox("Please select a cell to put the image as comment:", "KuTools for excel",, ,, ,, 8) Set Rng = Application.InputBox("Please select the url cells:", "KuTools for excel", Selection.Address,, ,, , 8) 'Ensure Comment is Hidden (Swith to TRUE if you want visible) Set CommentBox = Ĭ (PicturePath)Ĭ 6, msoFalse, msoScaleFormTopLeftĬ 4.8, msoFalse, msoScaleFromTopLeft With Application.FileDialog(msoFileDialogFilePicker) I need the images to be inserted as comment as the 1st code does to the destination range user selects.
I really tried to combine them to do one job, but I guess I don’t have enough knowledge on this. Will fetch Hyperlinks(Local folder path only, not web based URL) and paste them in destination cell My research ended up in 2 different macros that combined will give a good utility for my work.ġ.