I am currently working on an interactive process map within MS Visio and use ActiveX Control Toggle Buttons to switch between Layers and I also use Hyperlinks to switch between Pages.
When exporting my VS Visio file to a PDF file the hyperlinks work but my Buttons (+ Code) are not exported correctly. They are just "printed" as an Image and are not toggable.
Is there a way to implement the behaviour I desire? Must not necessarily be through ActiveX Control Buttons.
You may be able to achieve similar effects using Shapes with ShapeSheet formulas as you are currently doing using ActiveX controls. By using shapes you have more control over how they look when exported to PDF.
You could create or reuse existing checkbox or button shapes to toggle the visibility of layers. You could add a function to shape’s double click (EventDblClick) cell to turn and off layer visibility using a double click:
SETF("ThePage!Layers.Visible[2]",IF(ThePage!Layers.Visible[2]=1,0,1))
The same formula could be used in the Actions section to turn on and off layer visibility using a right mouse action.
Parts of the shape could be hidden or displayed by putting a reference to the layer’s visibility in NoShow cell of Geometry sections.
You can also have shapes link to other pages like the “Off Page Reference” shapes do in the Flowchart templates. See Going Off the Page.
Related
I am a beginner at VBA.
I am designing a somewhat interactive Powerpoint presentation/s. I want to be able to have three separate Powerpoint presentations open that will link together. I have been trying (without success) to create, in VBA, code which will change the current displayed slide on one Powerpoint file by clicking a button in another. I can hyperlink to the set slide but this causes this slide to pop up on the same screen in which it is clicked, despite it being already open in another screen (I don't want this).
Thanks in advance for any help,
Holly
VBA uses an object model that is a huge hierarchy of attributes and functions that represent the application. You can use this model to view and update attributes to get text, resize, and modify the application. You should look at some tutorials to get you started. When editing your code, you can press F2 to see and explore this object model. You can press F8 to run your code line by line (debug mode) and see what is happening.
To your question, you can access the open presentations in the application.presentations object (https://learn.microsoft.com/en-us/office/vba/api/powerpoint.presentations). You could then use a presentation in that list and use the ActiveWindow.View.goToSlide function (https://learn.microsoft.com/en-us/office/vba/api/powerpoint.view.gotoslide). Here is a free tutorial that I've used in my VBA journey (https://www.tutorialspoint.com/vba/index.htm).
PowerPoint has a Presentations collection that contains all currently open presentations. You can get a reference to any of them via Presentations("name") where "name" is the filename of the presentation, sans extension.
So ... assuming you've got three presentations open, a.pptx, b.pptx, c.pptx you can do something like this:
Sub SlideChange()
With Presentations("c")
.SlideShowWindow.View.GotoSlide (3)
End With
End Sub
If you run the above in any of the presentations, it will change the slide show window displaying presentation c to the third slide.
Hopefully a quick one
I am creating a form in Word with a Save macro that uses an ActiveX Label as a button. The label works fine as a button but I am having 2 issues:
when using the document in normal mode, the coding text in curly brackets for the label is still visible - see image
How do I get rid of this?
When printing the form, the button pushes the header text down a line:
You can see in the first picture that there is no gap here.
Thanks for your help.
(1) Press Alt+F9 to toggle off display of field codes (and make sure you're not in Design Mode).
(2) is impossible to be sure without having the document in front of me but...
Printing problems are notorious with ActiveX controls, which were designed for use with UserForms, not for the document surface. Your best bet for stability would be to use a one-row, two-column table with the button on the left and the address on the right.
Or use a MacroButton field code instead of an ActiveX control.
I have a simple excel form with an ActiveX control (ListBox)
When I share this over email, the recipient does the following steps:
1. Open the excel
2. Enable Content for the macro
Now - the ListBox grows in size.
I'm unable to dynamically resize or figure out the exact event for "Enable Content".
Is there anyway I can retain the dimensions of the ListBox?
Your problem has nothing to do with sharing the document via email. It has everything to do with window scaling. To prove this to yourself try connecting to a projector with the the excel document open. Use some Active X controls and they will shrink or Expand. I've had this problem and found the only way to avoid it in a reasonable manor is to implant a form inside the excel document that holds all the needed controls or ensure the end user is not scaling their display in any manor.
By the "Shapes Menu," I mean the menu that you get to from the ribbon by going to Home -> Shapes.
I would like to either:
Choose my own shapes for within the Shapes menu, including changing the names of separators
Create my own ribbon menu from scratch that allows you to create a gallery with separators
Here is a picture:
Note: I'm interested in doing this for Powerpoint 2013, not sure if that makes a difference.
A global intro to the Ribbon is available on the Microsoft site at http://msdn.microsoft.com/en-us/library/aa338202%28v=office.12%29.aspx. Be sure to check out parts 2 and 3, links to which are located in left menu of that page above.
More specifically, you might find some useful guidance on building a Gallery at http://msdn.microsoft.com/en-us/library/dd904887%28v=office.12%29.aspx.
In terms of modifying the XML behind ribbons, I use the Custom UI editor. You can download it at http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2009/08/07/7293.aspx
so I've found that Powerpoint 2007 has no bookmark functionality. So I can't just insert dynamic data into a presentation. Also, there are no autostart event handler, but I found a way of doing it by editing the XML data. This now works, I've got a custom event handler that is run as expected.
Now, I tried to solve the no bookmark functionality by adding a label insted. Since a label has a name I can assign the Caption property a value. And that value can be dynamic data.
And this actually works, yay! BUT, this presentation has a custom font and font embedding is crucial. And now I've found that PowerPoint 2007 doesn't look to support font embedding on labels. And probably not buttons and textboxes as well. That is, the typical visual studio controls.
Are there any other ways of fixing this? A normal text placeholder doesn't have an ID.
But can I target them anyway? It's just some text in the footer of a slide design that I'm trying to put dynamic data.
Ok, so I found out how to target textboxes in PowerPoint 2007.
ActivePresentation.SlideMaster.CustomLayouts.Item(11).Select
ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Select
ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Characters(Start:=1, Length:=25).Select
ActiveWindow.Selection.TextRange.Text = "New text that should be inserted"
The problem now is how to run this automatically. New thread for that.