question

JosLuisFernndezVzquez-3484 avatar image
0 Votes"
JosLuisFernndezVzquez-3484 asked thedbguy edited

powershell command at msaccess

I´m trying to run a powershell command to create a image local file from the clipboard image without succeed. Could somebody help me to find the right command. thxs. -------------------------------------------------my access form code------------------------------------------- Option Compare Database Option Explicit Private Sub CreateImageFromClipBoard(ByVal sFileName As String) Dim wshShell As Object Dim ShellReturnCode As Long Dim sCmdExec As String Set wshShell = CreateObject("WScript.Shell") sCmdExec = "powershell -command get-clipboard -format image" ShellReturnCode = wshShell.Run(sCmdExec, 1, True) sCmdExec = "powershell -command $img = get-clipboard -format image" ShellReturnCode = wshShell.Run(sCmdExec, 1, True) sCmdExec = "powershell -command $img.save('" & sFileName & "')" ShellReturnCode = wshShell.Run(sCmdExec, 1, True) Set wshShell = Nothing End Sub Private Sub Comando1_Click() CreateImageFromClipBoard "C:\users\josel\desktop\temp.jpg" End Sub -----------------------------------------------------------------------------------------------------------

office-access-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

thedbguy avatar image
0 Votes"
thedbguy answered thedbguy edited

Hi. Have you tried any of the suggestions given to you in the other forum?

UtterAccess


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.