Word is a perfect compliment to Access; you can automate Word using VBA in Access. Word document properties give you a powerful way to substitute data that’s stored in Access. However, the user interface to manage them in Word is inadequate. You'll learn how to do it all in Access instead.
One might use Word Document Properties instead of making merge documents or using bookmarks. Just modify a document property and presto! all places that value is used automatically change when the document is updated.
In this presentation, you’ll see an example of an Access form that reads property names and values from the ActiveDocument in Word. They’re displayed on a subform that enables you to change the values and update the Word document. Behind the scenes, VBA is busy. You’ll also get a link to download the sample database.
It’s handy to see everything in one place to help ensure accuracy and alleviate the need to actually read a Word document to make sure all places that specify a particular text, date, or number are right.
Crystal Long has been using and developing with Access and related applications a long time. She connects 1-on-1 and guides developers as they’re building applications, and teaches in virtual classrooms.
On her website, MsAccessGurus.com, you can find free code, tools, videos, and articles. Her YouTube channel, LearnAccessByCrystal, has lots of Access videos and some about other Office topics. She is a long-time Microsoft MVP for Access and on forums, she posts as strive4peace.
Links to resources mentioned in the video are available at 44:52 mark.
Table of Contents:
00:00 - Introduction to Crystal Long
00:12 - Intro to tonight's topic: Automating Word from Access VBA
01:37 - Why would you use Word Document Properties?
01:53 - The benefits of using Word Document Properties over merge documents
02:27 - Modify values in Word fields without having to do it in the clumsy Word interface
02:33 - Display Built-in Document Properties in File Explorer
03:04 - In Word, it is hard to see and modify all Document Properties
03:15 - Access VBA makes it easy to see and modify Word Document Properties
05:31 - Demo: Fields in a Word document display Document Properties
07:14 - Document Properties are editable, but the Word interface is clumsy
09:44 - Update one change or update all changes
10:11 - Retrieve Document Properties from fields in an open Word doc
10:34 - Demo: Do It more easily and quickly with Access
11:57 - The tables in the demo
13:29 - The Access form at work
18:44 - Access does it all quicker than Word can
19:58 - Filter Document Properties
21:08 - First attendee's question: Is there a link to Word Docs? (No, it's automation)
21:45 - The step-by-step Access code review begins
27:00 - Did you know you can drag a Word doc to Word's Backstage to open it?
27:56 - Multiple open Word Docs displayed in Access form
28:24 - The form displays built in and custom properties in different fonts
28:43 - Bolded, built in, properties display in Windows Explorer
31:47 - Next attendee's question: Can you create Document Prosperities in the Word Doc from Access? Yes, but not through this form
32:53 - Insert Doc Property Fields under Quick Parts in Word
35:14 - Demo: Code to create a table with its Document Properties listed
37:52 - Créate Document Properties on the fly in Access VBA
43:47 - Summing it all up
44:32 - Links to important Resources
46:34 - Crystal's Contact info
46:53 - Kent Gorrell's upcoming Presentation
50:10 - FSO And the Future of Access development