AppActivate Restore Active Window App in VBA - 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})"

Related

excel not responding after closing Find menu that is opened with vba

I have created a button in a excel sheet that opens the Find menu (ctrl+f).
Sub Button6_Click()
Application.Dialogs(xlDialogFormulaFind).Show
End Sub
After the search is done and one closes this menu excel doesn't respond anymore and closes itself. Any ideas why?
Also, I don't get the exact same find dialog as when I use ctrl+f. Is there maybe a way to use keyboard-functions in vba?
Why not use ctrl+f instead of the button. Because my colleagues are not quite good with excel and that already is too much to remember for them :)
This is how to mimic a key press in VBA ^ is Ctrl
Sub Button6_Click()
Application.SendKeys ("^f")
End Sub

Word 2010 - Trying to open Check Accessiblity and Properties panel from a macro

I tried recording opening the "Check Accessibility" option under the File>info>prepare for sharing, but nothing gets recorded. I have tried going through all of the Dialog show commands, but cannot find any that will open the menu.
I also tried to turn on the "Show Document Panel", and I can't get that to toggle either.
How can I have these open with the macro? I want to setup the workspace with a single button.
Try
Application.DisplayDocumentInformationPanel = True
Try this.
Application.CommandBars("Accessibility Checker").Visible = true

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

DisplayAlerts for PPT links not working

I'm running a VBA macro in PowerPoint, in which I open another PowerPoint document with several links in it.
I don't want the pop-up with the question to update these links to appear. So I included Application.DisplayAlerts = False. However this doesn't work: My macro still stops and shows the dialog, and I need to press Enter to be able to continue.
How do I fix this?
Application.DisplayAlerts = False
Presentations.Open FileName:=stdRapport, ReadOnly:=msoFalse
ActivePresentation.UpdateLinks
.DisplayAlerts has never done much in PPT, unlike Excel et al.
You can theoretically disable hyperlink warnings via the registry. I've got a page here that gives the general outline and includes links to the relevant pages on MS for various Office versions:
Security warning message when clicking a hyperlink: "files might harm your computer"
http://www.pptfaq.com/FAQ00587_Security_warning_message_when_clicking_a_hyperlink-_-files_might_harm_your_computer-.htm
I don't think there's any way of disabling hyperlink warnings on someone else's computer.