Microsoft Word is the most recognized document creator and printer, with a large following of users who are familiar with this program. The programming Visual Basic for Applications (VBA) is used to program custom reports, and Xojo uses a plugin to allow remote control Microsoft Word through VBA.
The book I Wish I Knew… How to Program Word 2019 with Xojo API2 in Windows contains around 10 years of technical data, inquiries, examples, queries, and answers to questions that are explained with Xojo code. There are 17 chapters with more than 360 pages with over 120 examples programs.
Download the Table of Contents at the authors website (https://scispec.ca) and select books to view to the topics. The book is in PDF format with example chapter folders containing Xojo source code and working examples.
Note: Microsoft Word has a 2016 version, and a 2019 version. Some of the functionality has changed with Microsoft when moving from 2016 to 2019, and this new book has the updated API2 code along with being compatible with the newer Microsoft Word 2019 version. Some of the code for this book will not work with Microsoft 2016 because of some of the changes that Microsoft did to the program.
New to version 3.0 -- July 2021
Here are some of the many categories of changes to version 3.0 of this book:
- Added SpellCheck functionality in Example 17-1
- Added saving a docx file in Example 2-16
- Update code to Microsoft Word 2019
- Update all code to API 2
- Uses version Xojo 2021 r1.1
- Updated all project IDE minimum versions
- Update plugin installation instructions
- Fixed numerous grammatical errors
- Changed API MsgBox to API2 MessageDialog.Show
- Added example code that contains parameters and return values
- Removed unused variables from examples
- ShowAnimation has been removed in Word 2019 (Example 3-10)
- Updated API 1 Len with API2 String.Length
- Updated API 1 Left with API2 String.Left
- Partial Xojo fixing of watermark example, where it ‘mostly’ works (Example 12-1)
- Updated API 1 Split to API 2 String.Split
- Updated API 1 Ubound to API 2 LastIndex
- Updated API 1 Append to API 2 Add
- Updated API 1 ListCount to API 2 RowCount
- Updated API 1 Cell to API 2 CellValueAt
- Added Example 17-1: Live Spell Check Xojo Text
- Added Example 8-2: Change text columns in a page
- Added Example 8-3: Multiple orientation on multiple pages
- Added Example 8-4: Text Columns and Multiple Orientation