1

I made a nice spreadsheet with Excel VBA for our construction sites advancement. It has interactive buttons and it runs on a windows surface pro. I made it all with Userforms and vba functions.

One of the buttons allows the user to open the camera app on the surface to snap pictures of advancement on the go. It works well and it is very handy. Although, window saves all the pictures in the same folder, by date.

I would like to know if there is any way I can change the new image save location with a VBA or with somethng that could work with my workbook. Is that even possible ? It saves by default in my pictures folder. Or do you guys think of any solution to my question.

Thanks for your time it is very appreciated !

I open my camera with this simple macro. (There is a shortcut for the camera on my desktop for simplicity)

Sub Open_Camera()

Dim MyFile As String
Dim Cmd As String
MyFile = "C:\Users\Name\Desktop\Camera.lnk"
Cmd = "RunDLL32.EXE shell32.dll,ShellExec_RunDLL "
Shell (Cmd & MyFile)

End Sub

I would like it to save in a folder for which i could specify the name and date.(Like My pictures\Folder_Name_Date\Pictures. The name and date information is in my spreadsheet.

Pawel Czyz
  • 1,651
  • 4
  • 17
  • 21
Gabriel
  • 25
  • 1
  • 4
  • Perhaps: https://stackoverflow.com/questions/43904385/using-excel-vba-macro-to-capture-save-screenshot-of-specific-area-in-same-file – Guest May 02 '19 at 21:03
  • 1
    Since it's unclear where that suspicious `Camera.lnk` came from (I visited the website in the answer to the similar question from 2015, but it's still suspicious) then I think you best bet is to move the file (Where this gets saved) to the location you want it via vbscript after executing the Shell command here. – JNevill May 02 '19 at 21:04
  • Camera.lnk is only a shortcut I created on my desktop. Its a shortcut to my camera app. It seems the camera saves new picture in the default windows directory. This is what i would like to change. – Gabriel May 02 '19 at 21:09
  • did you find a solution for your problem? – sn1ks Apr 20 '20 at 09:42

0 Answers0