powershell command at msaccess

José Luis Fernández Vázquez 1 Reputation point
2021-03-25T10:07:00.587+00:00

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 -----------------------------------------------------------------------------------------------------------

Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
820 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. DBG 2,301 Reputation points
    2021-03-25T16:28:45.297+00:00

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

    UtterAccess

    0 comments No comments