Forum Discussion
Budman361530
Aug 05, 2021Brass Contributor
Macro capable of Picking Random PDF files in a hyperlink, and or save them in a specific file.
Ok... so here is my question/problem. I have a folder that has let's say 100 different PDF's for safety training. We need to give them out at the beginning of each day, of each job. The "safety ta...
HansVogelaar
Aug 05, 2021MVP
Do the names in column A include the path? If so, change the line
Cells(CellsOut, 4) = Names(ArI)
to
ActiveSheet.Hyperlinks.Add Anchor:=Cells(CellsOut, 4), Address:=Names(Arl)
If they do not include the path, use
ActiveSheet.Hyperlinks.Add Anchor:=Cells(CellsOut, 4), Address:="C:\Folder\Subfolder\" & Names(Arl), TextToDisplay:=Names(Arl)
where C:\Folder\Subfolder is the path.