Simulate a click in the ribbon toolbar of visio by using vba - 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/

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})"

Create a custom information window in Word VBA

Is it possible to somehow have way for the Selection.Style (and possibly other info) to always show up in a custom information window similar to the way Debug.Print prints in the immediate windows but ALWAYS visible?
I find myself struggling to quickly check a Selection.Style. MsgBox requires clicking "OK".
I have used the "Reveal Formatting" window but I would like more control over how the information displays.
Is this possible?
At least for knowing the Style at the current selection point, you don't need a custom user form. Place the StyleGalleryClassic control on the QAT or a Ribbon tab.

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

Press/simulate keyboard keys in access 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"

Creating Strikethrough Macro in Excel

I'm a novice to VBA and I'm trying to make a simple macro where one can highlight a set of cells, click a button, and strikethrough the selected sells. After, you can select the cell again, click the same button, and remove the strikethrough.
I have been looking for decent documentation but, have yet to find anything.
Here's some code.
Also, I would love to know where the best documentation is on VBA.
Sub strikeOut()
Selection.Font.Strikethrough = True
End Sub
I also need help with the command button.
Thank you.
It looks like you're on the right path. Based on your code, I'm assuming you already have a command button created. If so try this:
Sub strikeOut()
With Selection.Font
.Strikethrough = Not .Strikethrough
End With
End Sub
To create a command button:
Excel 2003 and earlier:
Open up the Visual Basic toolbar and activate the Control Toolbox button. Another box/toolbar should appear with different control options.
Select the Button option and place it in the desired location.
Excel 2007 and later:
Click on the Developer tab/ribbon.
Select Insert and select Button and place it in the desired location.
*The steps below apply to all versions from this point forward.
Right-click on your new button and select Properties to give your button a name/caption.
Right-click again and select View Code.
In the ButtonName_Click() sub, add the strikeOut() call using either:
Call strikeOut()
or simply
strikeOut
To answer the second part of your question, it's hard to say what is the 'best' but here are some links that may help:
Chip Pearson's site
MSDN
OZgrid