Press/simulate keyboard keys in access vba - vba

I am automating a process in my office, and saving a pdf file is part of it. So how can I save it? I need to press Ctr+Shift+s ..
I see solutions here but its in java. Looking for anyone who can share ways on how to simulate this. Also tried SendKeys but I can't pull Ctr and Shift.
SendKeys "S"
SendKeys "{TAB}"
this types "S", tab, well its tabs to the next control. But {CONTROL} , {SHIFT} does not work.
Is this possible? Or are there other ways to do this?

The keyboard modifiers have a special syntax, see the documentation.
Ctrl + Shift + s = SendKeys "^+s"

Related

AppActivate Restore Active Window App in VBA

I'm trying to restore a minimize active window app after using AppActivate by using SendKeys, however the option did popup but it didn't click the "Restore".
I believe this can be done by using Windows API, but to be honest, I don't know anything about that, so hopefully someone can help this problem so that I can use in VBA.
Below code is the example, New Folder currently minimize and I want to Restore(Open) and then screenshot.
Thanks!
AppActivate ("New Folder"), True
Application.SendKeys "(% )(R)"
Application.SendKeys "(%{1068})"

CATIA Macro Scripting - Expand Single Tree Node

Is it possible to expand a single node in the tree all levels, using macro code. I see that you can expand all nodes, but I don't want to do that. Also, I see you can expand selected, but I don't want the user to have to make a choice, additionally I can't even get this StartCommand working properly. Just wondering if it's possible to expand a single node using only macro code, and if so, HOW? I'm using V5 R22.
The node has been selected already, Here is my code using SendKeys...
CATIA.StartCommand ("Expand Selection")
AppActivate "CATIA V5"
SendKeys "{UP}"
SendKeys "{TAB}"
SendKeys "{ENTER}"
This has no effect on the Expand Selection dialog

Simulate a click in the ribbon toolbar of visio by using vba

I'm looking for a way to simulate a click on a button (Synchronize All) from an addin (http://visguy.com/vgforum/index.php?topic=6086.msg24731#msg24731) in the ribbon toolbar of Visio within VBA-Code.
Please look at this picture for understanding: http://img4.picload.org/image/cpcgidr/ribbon.png
A pragmatic approach of mine was to use the "sendkeys"-function, because it's easy and sufficient. The problem with this approach is, i cannot navigate to the main-button (marked as 3. in the picture) by using the shortcuts "ALT+V" and "B" via sendkeys, i'm only able to navigate to the "conflicts panel" button as a subitem of "Synchronize All" (marked as 2. in the picture).
Does somebody have an idea how to click on the main-button (marked as 3. in the picture) via sendkeys or in a different way?
I'm just use this:
SendKeys "%v", True
SendKeys "b", True
SendKeys "{ENTER}", True
Please help me out with this, i've googled a lot without any results...
Best regards
Joerg
The author of that tool has implemented that trigger into that programm an has recompiled it, as you can see here: http://unmanagedvisio.com/products/backsync-backward-visio-data-synchronization/

how to double click web object in VBA

I am automating a web process with VBA. I go find an object on a webpage using
IE.document.getelementsbytagname
etc.. Once that object is found, you can single click using
objElement.click
The question is, how do I double click?? All my searches have come up with nothing. I thought dblClick or doubleClick would do the trick, but those are invalid methods. I tried a workaround by using
objElement.click
sendkeys "{ENTER}"
to click and then hitting enter would open the link, but that doesn't work either.
I finally got this working:
objElement.click
objElement.FireEvent "ondblclick", 1, 2

winforms closing issue, vb.net

i have a vb.net 2.0 winforms application.
When i open another application (like calculator ) have the focus to it and try to close my application the screen freeze and i have to use ctrl + alt + del to get it to refresh.
Any idea what can affect that?
If I understand your dilemma, somewhere you're sending SENDKEYS, and if you do not have focus and you SENDKEYs the app freezes.
Why not simply add a
if Me.Focus then SendKeys