The current code I am using opens up my image in paint, and then I have to manually set this picture as my desktop background. Is there a way that I can use VBA to set my computer desktop background for me. I know this seems like a ridiculous request, but there is reasoning behind it; I promise.

The current code I am using it here:


Function OpenImage(sFileFullPathAndName)
On Error GoTo Error_Handler

Shell Chr(34) & "C:\Windows\System32\mspaint.exe" & Chr(34) & " " & _
Chr(34) & sFileFullPathAndName & Chr(34), 1

If Err.Number = 0 Then Exit Function

Error_Handler:
MsgBox ("Hate you guys")

Exit Function
End Function

Sub Background()

OpenImage ("N:\public\Zach Evans\Tensile Test.jpg")

End Sub



Thanks for the help!