本文介绍了打开Windows 8.1“相机应用”,使用VBA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以MS Access 2013(VBA版本为7.1)编写的VBA在MS Surface平板电脑(运行Windows 8.1)上打开 Camera应用程序。

I am attempting to just open the "Camera" app on a MS Surface tablet (Running Windows 8.1) using VBA, written in MS Access 2013 (VBA version is 7.1).

我用过这个 Shell( C:\Windows\System32\write.exe)过去,它可以满足我的需求。 (这只会打开写字板)。

I have used this Shell("C:\Windows\System32\write.exe") in the past, and it does what I need. (This just opens up Wordpad).

但是,对Camera应用程序使用相同的代码不会运行它。 Shell( C:\Windows\Camera\camera.exe

However, using the same code for the Camera app doesn't run it. Shell("C:\Windows\Camera\camera.exe"

我去了相机的目录,双击.exe,它仍然没有打开。它在任务管理器中弹出一两秒钟,然后消失。

I went to the camera's directory, double clicked on the .exe, and it still doesn't open. It pops up in task manager for a second or two, then disappears.

当我按

是否有办法让VBA正确打开此相机应用程序?(只是为了澄清;我不需要该应用返回任何东西,我只想打开它。)

Is there a way I can get VBA to open this camera app correctly? (Just to clarify; I don't need the app to return anything, I just want to open it).

感谢您的时间!

Ben

推荐答案

如果有人感兴趣,我已经找到解决此问题的方法。我使用了来帮助创建到Camera App的快捷方式,然后我使用VBA运行该快捷方式,足以满足我的需要!运行链接的代码如下...

If anyone is interested I have found a work-around for this problem. I used this website to help create a Shortcut to the Camera App. I then used VBA to run the Shortcut. Works well enough for what I need to do! The code to run the link is as follows......

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

这篇关于打开Windows 8.1“相机应用”,使用VBA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 09:50