Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-05-2023, 12:54 PM
SnakeDoctor's Avatar
SnakeDoctor SnakeDoctor is offline VBA Command Buttons to Navigate thru Word Windows 11 VBA Command Buttons to Navigate thru Word Office 2021
Novice
VBA Command Buttons to Navigate thru Word
 
Join Date: Jul 2023
Location: Ft. Worth, TX
Posts: 7
SnakeDoctor is on a distinguished road
Question VBA Command Buttons to Navigate thru Word

I have two questions about VBA and Word.

First, is there a good user manual for VBA? I bought one called 'Mastering Word VBA' on Amazon, and it is not easy to understand for a novice like me.

Second, is a practical question. Until now I have never used VBA as what Word couldn't do, I could use Adobe Acrobat Pro to do. Unfortunately, that solution is not an option for this customer.

I have built a (Word table) checklist (.docx) for end users to complete test steps and add screenshots into, with simple 'shape' built buttons with added cross-reference links for 'Ctrl + Click' navigation. Test steps (1-22) are on pages 2-3, then screenshot pages, 2 per page, are pages 4-14. (See example attached.)

What I would like to do is create a 'real' (functioning) button to replace my clunky ones, that with a single-click will navigate to the appropriate cross-reference that is already added as a bookmark in the document.

Is VBA even capable of doing this? If so, then:
1. How do I build the buttons I need and scale their size and text.
2. How do I add the cross-reference 'links' to the buttons.
3. Is there anything I need do to ensure the end users of this template can use the buttons?
Attached Images
File Type: jpg PIC1.jpg (74.6 KB, 7 views)
Reply With Quote
  #2  
Old 07-05-2023, 05:52 PM
Guessed's Avatar
Guessed Guessed is offline VBA Command Buttons to Navigate thru Word Windows 10 VBA Command Buttons to Navigate thru Word Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

In answer to Q1, the best book on Word VBA that I ever read was the first one - Word 97 Annoyances by Woody Leonhard. It was very readable and changed my mindset on how to interact with the software. I believe it would be an awesome starting point despite the fact that it is over 25 years old. Once you have that under your belt, you could simply review forums and look at code that gets posted in response to people's questions. That plus recording macros is all I have used since then.

Making links to run VBA via buttons is clunky and not the preferred way. A simpler way to kick off macros by clicking in the document is a MacroButton field.

However, forcing users to enable macros to get functionality is against the principles of safe web use so users need to see real value in enabling that functionality. Because the same functionality could be done without macros, it would be hard to justify the business case of requiring macros. If you have a close relationship with the IT group running the network you could sign the macros and have certificate public keys loaded on their machines or have trusted folders for templates to smooth out some of those issues but it remains a risk.

I would simply add Cross-References or Hyperlinks to Bookmarks to do the same thing unless there are other reasons to force users to enable VBA macros.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 07-06-2023, 07:47 AM
SnakeDoctor's Avatar
SnakeDoctor SnakeDoctor is offline VBA Command Buttons to Navigate thru Word Windows 11 VBA Command Buttons to Navigate thru Word Office 2021
Novice
VBA Command Buttons to Navigate thru Word
 
Join Date: Jul 2023
Location: Ft. Worth, TX
Posts: 7
SnakeDoctor is on a distinguished road
Default

Honestly, the shape-built 'buttons' I have work fine. I was investigating whether or not I could include 'animated' style buttons to make it look more professional.

I sort of have my back against the wall, being forced to release complex checklists as Word files, not pdf, for inexperienced users to work with. The third-party pdf vendor they use doesn't support the Javascript I would typically use in an Adobe pdf to do what I want.

But, yea, I completely agree with you. I'll just rely on what I have, and an instructions cover page, and hope for the best!

Thank you, Andrew!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding Command Buttons before PDF ksigcajun Word VBA 3 05-07-2014 05:31 AM
VBA Command Buttons to Navigate thru Word Command buttons on slidemaster chcope PowerPoint 2 06-13-2013 04:30 PM
Command Buttons lorenambrose Word 0 10-06-2011 11:55 AM
command buttons ronf Excel 0 04-28-2006 08:32 AM
command buttons ronf Excel 0 12-03-2005 06:26 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:33 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft