Driving Behavioral Change for Information Management through Data-Driven Gree...
VT University Live Session 3
1. VT University Live Session
Using Macros to Customize VT Docs
Eoin Wren, VP of Engineering
VT Users Conference Virtual Session: April 30th
, 12pm EST
2. ˇˇ
WEBINAR HOUSEKEEPING
• Our call will last approx. 1 hour.
• Please ask your questions in the ‘Question’ facility.
• We have Q&A sessions throughout today’s session.
• Please complete the survey at the end of the session.
• The recording will be shared a few days after this webinar.
3. MEET
• Evelyn Wolf
• CMO, VisibleThread
• evelyn.wolf@visiblethread.com
• Eoin Wren
• VP of Engineering
• eoin.wren@visiblethread.com
YOUR SPEAKERS
4. AGENDA 02.
Creating Your Own Macros
– Excel Developer Tab
03.
Creating Your Own Macros
– Recording a new Macro
01.
Introduction
04.
Creating Your Own Macros
– Adding your Macro to the
VT Macro Template
05.
Creating Your Own Macros
– Testing your Macro
06.
Creating Your Own Macros
– Writing your own Macro
using VBA
6. ˇˇ
WHAT are Excel Macros?
“If you have tasks in Microsoft Excel that you do repeatedly, you can create a macro to automate
those tasks.
A macro is an action or a set of actions that you can run as many times as you want.“
• Macros are a simple series of instructions to complete a desired output
• Created macros will execute instructions, step-by-step on data contained in your Excel Workbook
• Macros save you time on a sequence of instructions that are done manually on a regular basis
7. ˇˇ
WHY use Macros with VisibleThread?
• VT Macros allow specific repetitive tasks to be automated in your compliance matrix, or any Excel Export
• We will talk today about customizing compliance matrix outputs, but the same process applies to Excel exports from Concept
Tracking and Discovery.
• Change the formatting of the compliance matrix output by:
• Adding columns
• Adding color formatting to cells, rows, columns, and text
• Adding new sheets to the output with separate layout
• Pull text from other cells or columns and place in other parts of the output
• Used well, macros can be an excellent way of standardizing how you use the VisibleThread Compliance Matrix across your proposal
teams.
8. ˇˇ
WHAT tasks are good candidates for Macros?
• Not all tasks are good candidates for automation using macros
• Good Candidates:
• Tasks that can be described using a set of simple repeatable steps that will work for all types of RFPs.
• Tasks that do not require any additional data other than data in the compliance matrix.
9. ˇˇ
WHAT tasks are bad candidates for Macros?
• Not all tasks are good candidates for automation using macros
• Bad candidates
• Tasks that require domain knowledge that cannot be codified in a simple set of rules. For example, “Highlight the first
paragraph in section M”. Can we write down a set of repeatable steps to identify this?
• Tasks that only apply to specific compliance matrices.
• Tip: think about asking a school kid to complete the task. Can you write down a set of simple steps that they can follow to
customize your compliance matrix?
10. ˇˇ
HOW to use macros with VisibleThread?
• Each VisibleThread Sandbox has an Excel macro “Template”
• This template contains a set of pre-loaded Excel macros that can be included for running in the Compliance Matrix output
• Let’s see an example!
11. HOW
1. Login to VisibleThread Docs
2. Select and RFP and click the button to generate a
compliance matrix
3. Ensure the “Include Macros to customize output”
option is checked
4. Click “Generate Matrix”
To use macros with VisibleThread?
Include Macros
12. HOW
5. Click “Enable editing” when the file opens in
Excel
6. If a security notice appears, click “Enable
Macros”
7. Click on the “VisibleThread Macros” button to
view the list of VisibleThread macros
To use macros with VisibleThread?
15. Two ways to create new macros
• Easy Way
• Use Excel to Record a set of
steps/modifications to the compliance
matrix
• Excel will generate Macro code behind the
scenes
• Not so easy Way
• Writing VBA Code to interact with and modify data in the Excel
Worksheet
• Some software development skills required
16. Confirm
That you have Excel Developer Tab
1. Confirm after opening excel that you have the
Developer tab available
2. If you don’t have the Developer tab, click on the
File menu and then select Options from the
menu bar
Developer tab
Options
17. Confirm
That you have Excel Developer Tab
3. The Excel Options window opens
Click Customize Ribbon option on the left.
Click on the Developer checkbox under the list
of Main Tabs on the right.
Click OK button.
1. Customize
RIbbon 2. Developer
Checkbox
3. OK
18. Confirm
That you have Excel Developer Tab
4. When you return to the Excel Spreadsheet view
you will have the Developer tab in your ribbon
bar.
5. You are ready to begin working with macros.
Developer tab
20. ˇˇ
How to Record a new Macro
Task: We wish to hide the first two columns and
change the theme colours in every Compliance Matrix
generated.
21. How
To Record a new Macro
1. Generate a Compliance Matrix from VT Docs
2. We will then record the manual steps we take to
customize the output
22. How
To Record a new Macro
3. Click on the “Developer” Tab
4. Click on the “Record Macro” button in the Code
group of shortcuts
5. In the ‘Record Macro’ dialog box, enter a name
for your Macro, e.g. “FormatColumns”. Click
“OK’
6. As soon as you click “OK’, Excel starts recording
your actions.
Developer
Tab
Record Macro
Macro Name
(this is the name
that will appear in
the macro menu)
23. How
To Record a new Macro
7. Start your actions:
• Hide columns A and B
• Add an extra column entitled ‘Compliant
Y/N’
• Change the background in Row 4
8. When finished, click the “Stop Recording” button
9. Save your Excel file as a Macro Enabled Workbook
(“VT_ColumnSettings.xlsm”) somewhere on your
PC (e.g. your desktop)
Stop
recording
24. Creating your Own Macros
3. Adding your Macro to the VT Macro Template
25. ˇˇ
Adding your macro to the VT Template
• Your VisibleThread Docs sandbox has a macro enabled Excel file pre-loaded
• This Excel file is a “template” that contains the macros that are included in every Compliance Matrix generated.
• To use your new macro with every Compliance Matrix generated in the future, we need to add it to the macro template in your
sandbox.
26. ˇˇ
Adding your macro to the VT Template
• Steps in summary
1. Download the macro template from your VT Docs sandbox. Save it on your PC (e.g. your desktop). Open this file in Excel.
2. Open the Excel Workbook that contains your macro (“VT_ColumnSettings.xlsm” from our earlier example) if not already
open.
3. Copy the VBA Module containing your macro from your Workbook (“VT_ColumnSettings.xlsm”) to the macro template file
downloaded from VT Docs.
4. Save the macro template file and upload it to VT Docs to apply your changes to the Sandbox template.
27. Adding
Your Macro to the VT Template
1. Switch to your browser
2. Log in to VTDOCS
3. Select the Settings icon.
You can modify any of your
account settings, including Thresholds,
Whitelists etc. here
Settings
28. Adding
Your Macro to the VT Template
4. Select the Excel Output Customization Options
”Edit” button.
5. Select “Download Workbook” button
6. Save the “VT_Template” workbook to your
desktop.
7. Close the Customized Excel outputs dialog box.
Excel customization
Download Workbook
Save
29. Adding
Your Macro to the VT Template
8. Switch back to Excel.
Open the saved “VT template” on your
desktop and click “Enable Content” to enable
macros
9. Open the recorded
macro file from earlier
(“VT_ColumnSettings.xlsm”) and click “Enable
Content” to
enable macros
Please make sure both documents are open
before starting Point 10
on the next slide
30. Adding
Your Macro to the VT Template
To view the macro code for the VT template you
created.
10. Select your Developer tab
11. Select the Visual Basic button
Developer Tab
Visual Basic
31. Adding
Your Macro to the VT Template
11. Excel files store VBA code in “Modules”
12. The code for your recorded macro will be in a
module created automatically called “Module1”
13. Double click on “Module1” to open code.
14. You should see a VBA “Sub Procedure” or “Sub”
for short. that contains the code for your macro.
The “Sub” should have the same name as the
name you gave the macro when recording it.
15. Copy the module to the
VBAProject in the VT macro base template (drag
and drop).
VBA “Sub” with
your macro code
Copy Module to
VT_Tempalte
32. Adding
Your Macro to the VT Template
14. Select the copied “Module1”
15. Rename the module to e.g. “VT_XXXX”
The module name must begin
with “VT_” to appear in the VT Macro Menu
16. Re-Save the VT Macro base template. Select File
à Save
17. Close all Excel documents
Rename module to follow
pattern “VT_XX”
33. A Note
On Naming Convention
The VT Macro template contains a “bootstrap” macro.
This displays a “Menu” of macros available in the
generated Compliance Matrix.
To have your macro appear here:
• Name the module using the pattern “VT_XXX”
• The bootstrap menu will search all modules that
follow that naming pattern for macros.
1. Rename the Module to
follow the “VT_XX” pattern
2. VT Menu will list all ‘Subs’
inside all “VT” modules
34. Adding
Your Macro to the VT Template
18. Return to your browser. Go to VT Docs setting in
Navigational Links.
19. Select “Excel Output Customization Options”
and select “Edit”
20. Select “Upload Workbook”
21. The upload Macros dialogue box appears.
Browse and select saved
“VT Template” macro file. Click “Upload”.
22. Click OK once complete. Close the dialog box.
Upload Your new
VT Template
37. Testing
Your Macro
1. Open your web browser and login to VT Docs
2. Select and RFP and generate a Compliance
Matrix.
3. Ensure you choose to have macros included in
the output
Include
Macros
38. Testing
Your Macro
1. Open the generated Excel file
2. Click “Enable Content” to enable Macros
3. Click on the “VisibleThread Macros” button to
launch the macros menu
4. Select the “FormatColumns” macro
5. Click “Run Macro”
40. ˇˇ
Why write VBA Code to create a Macro
• Using Excel to “Record” macros is a quick and easy way to automate tasks, however it has limitations:
• If the macro needs to use logic to decide on what actions to take.
• If the macro needs to manipulate sheets in the workbook. Recorded macros access sheets based on name. Sheet names can
vary depending on the RFP being shredded.
• If the macro needs to copy content from all rows or certain rows this may be variable depending on the RFP.
• The macro may need to manipulate the content based on some rules.
• Writing VBA code to create macros is more flexible and powerful, but requires Software Development skills
41. Working
With VBA Code
1. Open the Compliance Matrix output, and click on
the Developer Tab
2. Click the “Visual Basic” button on the toolbar
3. Code for Macros is contained in VBA “Modules”.
Right click on the “Modules” folder and select
“Insert class Module” to create a new Module
4. You are ready to start writing code !
42. ˇˇ
Macros some sample use cases
• Combining content from shreds of multiple volumes. For example collating the content of Section M and L side by side in a
new sheet.
• Applying conditional highlighting to paragraphs in the shred output e.g. highlighting FAR clauses that you are not compliant
with, based on dictionary categories
• Looking up dictionary terms in external reference to enrich the shred with supplementary information
43. ˇˇ
VBA Getting Started
• Naming Convention: Modules names should start with “VT_” . The VT Macro menu will list all “Public” subroutines that are
contained in modules that are named “VT_XXX”
• “VT_Utility” module contains useful functions to find the last populated column and last populated row of a worksheet
• Look at the sample VT macros. The sample “VT_ExtractContent” module is an example of a macro that can accept user input.
This macro will find all content contained in parentheses. The user can choose the style of parentheses (e.g. ‘()’, ‘[]’ etc.)
• Good practice to ensure the Compliance Matrix is in the format expected, e.g. correct number of columns and headings
before any data processing
44. ˇˇ
Macros further resources
• Help is available ! Our customer success team at customersuccess@visiblethread.com are happy to discuss
and help with your customization needs.
• Microsoft VBA Reference:
• https://docs.microsoft.com/en-us/office/vba/library-reference/concepts/getting-started-with-vba-in-
office
46. ˇˇ
MORE VIRTUAL SESSIONS TO COME
Change in schedule:
VT Docs – Acronyms, Doc and Excel Compare
Wednesday, May 06th, 12:00 – 1:00pm EST
Using VisibleThread to Drive Sales & RFP Strategy
Thursday, May 21st, 12:00 – 12:45pm EST
The Business Impact of VT Docs – Going Beyond
the Compliance Matrix
Thursday, June 04th, 12:00 – 12:45pm EST https://www.visiblethread.com/2020/03/visiblethread-
virtual-users-conference-2020/
47. ˇˇ
THANK YOU FOR JOINING US
To learn more & your additional questions
Learn more about
VisibleThread & VT Docs
Contact us
www.visiblethread.com
Support:
support@visiblethread.com
Demo:
info@visiblethread.com
Your Questions:
eoin.wren@visiblethread.com
evelyn.wolf@visiblethread.com
Wishing you, your families and teams good health.
From all of us at VisibleThread
For latest VT News – Follow us
on LinkedIn
https://www.linkedin.com/
company/visiblethread