How can a PowerPoint 365 add-in (.ppam) add a button for a macro to the Quick Access Toolbar? - powerpoint

I have "Microsoft 365 Apps for enterprise". I have developed a VBA Word macro and a VBA PowerPoint macro.
I want a similar user interface for each macro: ideally, a Quick Access Toolbar button.
For Word, this is easy:
In the macro-enabled template (.dotm), use the Word UI (File > Options > Quick Access Toolbar) to add a button for the macro, for just the .dotm file.
Copy the .dotm file to the %APPDATA%\Microsoft\Word\STARTUP directory.
Restart Word.
The button appears in the Word Quick Access Toolbar for all documents, and works. Job done.
For PowerPoint, not so easy, hence this question. The equivalent steps for PowerPoint don't work:
In the macro-enabled template (.potm), use the PowerPoint UI (File > Options > Quick Access Toolbar) to add a button for the macro, for just the .potm file.
Save the .potm file as a .ppam (PowerPoint add-in).
Exit PowerPoint.
Copy the .ppam to the %APPDATA%\Microsoft\AddIns directory
Start PowerPoint.
Load that add-in (File > Options > Add-ins > Manage: PowerPoint Add-ins > Go > Add New > select the .ppam > Open)
The Quick Access Toolbar button appears, but clicking it results in the error message:
The macro cannot be found or has been disabled because of your security settings

Diagnosis:
The macro cannot be found because the Quick Access Toolbar action in the .ppam refers to the .potm file name, not the .ppam.
Solution:
Unzip the .ppam file
Open the userCustomization\customUI.xml file in a text (or XML) editor
Change the file extension for the corresponding onAction attribute value (that runs the macro) from .potm to .ppam
Rezip the tweaked .ppam
Unload and remove the old "untweaked" add-in from the PowerPoint Option > Add-ins...
Exit PowerPoint
Copy the tweaked .ppam over the old file in %APPDATA%\Microsoft\AddIns
Start PowerPoint
Load the newly tweaked add-in (File > Options > Add-ins > Manage: PowerPoint Add-ins > Go > Add New > select the .ppam > Open)
The Quick Access Toolbar button should now run the macro.

Related

Copy path to opened file in PL SQL developer

When I open files in PL SQL developer I want to copy file path so I can go directly to the directory I need.
One way is to hover on the file and wait for tool tip to appear. But I have to wait a few seconds and I am not able to copy the path. Can I know the path in any other way?
Go to Configure > Tools
New
Define a tool as:
Executable/Script: cmd
Parameters: /c echo "#path" & pause
for the image I picked Tree View.png from the default selection.
The new tool will appear in the Tools menu under "User-defined tools" (briefcase icon).
Add it to the menu bar using More Buttons/Customize Quick Access Toolbar > More Commands > Commands tab > User Tools, then drag and drop (if using the Ribbon), or Right-click on toolbar, Customize > Commands tab > User Tools (if using the classic toolbar).
Or if you prefer, follow the same steps to add a custom tool calling explorer.exe passing #dir, the directory path of the current editor file. Selecting this custom tool from the menu will open Windows Explorer at the current file's location.
More suggestions and screenshots here: https://www.williamrobertson.net/documents/plsqldeveloper-setup-1.html#tools

How to open a file in the current editor panel from the Explorer in Visual Studio Code?

I can select the explorer tab in Visial Studio Code by pressing CMD+0.
From there I can open a file in a new editor tab by pressing CTRL+Enter.
Enter starts renaming
CMD+o shows the open file window
But how can I just open the file in the current editor panel without creating a new tab?
We can see in the screenshot that the "selected" (silhouetted) file in the Explorer panel was able to be opened via CTL-Enter: but it is in a new editor panel to the right :
![enter image description here
Let's open another file now using CTL-Enter: we can see there are now three editor panels:
That's clearly going to get problematic pretty rapidly..
Its "SPACE". At least in my installation.
The corresponding setting is filesExplorer.openFilePreserveFocus

No option to open the Build process Workflow Designer

I have a build process in TFS and I'm using Visual Studio 2010. I can view the build process in the default xml editor, but I want to open it in the Workflow Designer.
Mostly there will be an option to open the build process in the Workflow Designer or you can press Shift-F7 and it'll open it when viewing the xaml.
For some reason that has disappeared, any ideas why?
Is there any way to force VS2010 to open a xaml (or xoml) file in the Workflow Designer and / or are there any good Windows Workflow editors out there like Kaxaml for WPF / Silverlight?
I have the same condition.
I have set my default editor for .xaml to the XML editor. This speeds up the load time of the file because it does not have to load the designer, but prevents me from seeing the workflow view of a build process. There is no option in TFS to allow you to view the build in a different editor, there is only a 'View' option.
So here is my workaround:
Find a .xaml form in your solution (not a build process .xaml)
Right click the file and choose 'Open with...'
Choose 'Workflow Designer' and click 'Set as Default'
Click 'Cancel' because clicking OK will try and open the file, fail, and set the setting back.
Now go open your build process .xaml. If it was already opened, nothing will change, so close the tab and try again.
Don't forget to default your setting back.
It's not a great solution, but it works for what I'm doing.
Did you try right clicking the template file and using "Open With" and selecting Workflow Designer?

Remove image from ActiveX Image Control - VBA

I have created a macro enabled Excel Spreadsheet that will programmatically load a image from disk and load it into an ActiveX image control.
How to I remove the image? I want to remove the image from my testing the process. I do not need to create a script to programmatically remove it.
To clear out the picture manually:
Open the Visual Basics Editor and make sure you can View both the Project Explorer and the Properties Window.
In the Project Explorer select the Excel object or form the image control is on. (If it is a user form, you will need to double-click.)
The selected object should now be listed in the Properties Window. Click the drop-down box and select your image control.
Double-click the value for the Picture property so you have a blinking cursor.
Press Delete.
To remove the image manually, go into Design mode (View > Toolbars > Control Toolbox and click the "Design Mode" button). Right-click the control and choose "Properties". Click in the "Picture" property and backspace or delete until it says (None).
This assumes that the image is loaded into an Image Control on the worksheet and not on a VBA userform. You could follow mischab1's instructions if the control was on a VBA userform OR an image control.
And of course these instructions are for Excel 2003; the specific steps vary depending on Excel version.

Open two instances of a file in a single Visual Studio session

I have a file, xyz.cpp. I want to open two instances of this file in Visual studio (BTW, I am using Visual Studio 2005). Why would I want to do so? I want to compare two sections of the same file side by side. I know workarounds such as:
Make a copy of the file. But the problem is that it's not elegant, and I don't want to make copies every time I am faced with this.
I can split the window into two. The problem with split it that I can split it horizontally only. The result of a horizontal split is that the right half of my screen is white space.
If I were able to split it vertically or open two instances of the same file, it would increase the number of lines of code I can compare.
Visual Studio
Here's how to do it...
Select the tab you want two copies of
Select menu Window → New Window from the menu.
Right click the new tab and select New Vertical Tab Group
If New Window is not listed in the *Window menu note that the command does exist, even as of Visual Studio 2017. Add it to the Window menu using menu Tools → Customize → Commands. At that point decide where to put the New Window command and select Add Command.
VS Code
In Visual Studio Code version 1.25.1 and later
Way 1
You can simply left click on your file in the side-panel (explorer) and press Ctrl + Enter.
Way 2
Simply right click on your file in the Visual Studio Code side-panel (explorer) and select the first option open to the side.
For Visual Basic, HTML and JScript and RDL Expression, the Window > New Window option mentioned in PaulB's answer is disabled.
However an option can be changed in the Registry to enable the menu item.
All other languages do not restrict to a single code window so you can use PaulB's answer without editing the registry.
Enabling New Window in Windows Registry.[1] [2]
Go to the following registry key. This example is for Basic (Visual Basic), but the key is also there for HTML, JScript and RDL Expression.
64-bit OS: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Languages\Language Services\Basic
32-bit OS: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\Languages\Language Services\Basic
Find the value Single Code Window Only and do one of the following:
Set it to 0
Rename the value
Delete the value (use caution!)
This will enable the "New Window" menu item, but it may still not be visible in the menu.
Adding Menu Item
To actually see the New Window menu item I had to add it back into the menu:
Tools > Customize... > Commands > Add Command...
Select 'Menu Bar' the select the 'Window' menu in the dropdown
Add Command... > Window > New Window > OK
Restoring Registry Value
Copy-paste this to notepad, save as a .reg file and import the file into your registry to restore the initial setting.
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Languages\Language Services\Basic]
"Single Code Window Only"=dword:00000001
Go to menu → Windows → New Window:
You can use the Windows → New Window option to duplicate the current window. See more at: Why I like Visual Studio 2010? Undock Windows
Open the file (if you are using multiple tab groups, make sure your file is selected).
Menu Window → Split
(alternately, there's this tiny nub just above the editor's vertical scroll bar - grab it and drag down)
This gives you two (horizontal) views of the same file. Beware that any edit-actions will reflect on both views.
Once you are done, grab the splitter and drag it up all the way (or menu Window → Remove Split).
How to open two instances of the same file side by side in Visual Studio 2019:
Open the file.
Click Window → New Window.
A new window should be open with the same file.
Click on Window → New Vertical Document Group.
Result:
With the your file opened, go to command window (menu View → Other Windows → Command window, or just Ctrl + Alt + A)
Type:
Window.NewWindow
And then
Window.NewVerticalTabGroup
worked for me (Visual Studio 2017).
Or using menus:
Menu Window → New Window
Menu Window → New vertical tap group
Luke's answer didn't work for me. The 'New Window' command was already listed in the customize settings, but not showing up in the .js tabs context menu, despite deleting the registry setting.
So I used:
Tools
Customize...
Keyboard...
Scroll down to select Window.NewWindow
And I pressed and assigned the shortcut keys, Ctrl + Shift + W.
That worked for me.
==== EDIT ====
Well, 'worked' was too strong. My keyboard shortcut does indeed open another tab on the same JavaScript file, but rather unhelpfully it does not render the contents; it is just an empty white window! You may have better luck.
Window menu, New Horizontal/Vertical Tab Group there will do, I think.
When working with Visual Studio 2013 and VB.NET I found that you can quite easily customize the menu and add the "New Window" command - there is no need to mess with the registry!
God only knows why Microsoft chose not to include the command for some languages...?
For newer versions (such as Visual Studio 2017)
Select the window you want to duplicate.
Go to the window tab and click on split at the top of the list.
When you are done, click it again to toggle it off.
For file types, where the same file can't be opened in a vertical tab group (for example .vb files) you can
Open 2 different instances of Visual Studio
Open the same file in each instance
Resize the IDE windows & place them side by side to achieve your layout.
If you save to disk in one instance though, you'll have to reload the file when you switch to the other. Also if you make edits in both instances, you'll have to resolve on the second save. Visual Studio prompts you in both cases with various options. You'll simplify your life a bit if you edit in only the one instance.
I don't have a copy of Visual Studio 2005, but this process works on Visual Studio 2008:
Open xyz.cpp along with some other file.
Right click on tab header and select new vertical tab group.
Left click on that other file in the first tab group.
Open xyz.cpp through solution explorer again.
You should now have two instances of file in separate vertical tab groups.
To work on two sections of one long file, simply use a shortcut (Ctrl + \) or click on the split editor window while you are on the selected tab. The icon is on the top-right of the Visual Studio Code.

Resources