Forum Discussion
PacoDeBenito
Jun 27, 2023Copper Contributor
Can't access Word objects from Excel VBA code
Hello! I'm trying to write in a Word document from Excel VBA code, to place the data from am Excel table into a report. I added the "Microsoft Office 16.0 Object Library" to be able to work with Wor...
SnowMan55
Jul 02, 2023Bronze Contributor
"Microsoft Office 16.0 Object Library" does not contain the classes, etc., you are looking for, i.e., Word classes. Scroll further down in the References dialog to find "Microsoft Word 16.0 Object Library", and select it.
Then open the Object Browser (under the VBA Editor's View menu); select Word from the upper dropdown list (which usually shows <All Libraries>) to see a top-level view of this library's classes. You can click on a class name to see its members, and click on a member name to see more info on it in the pane at the bottom (which has a draggable border, so you can make it taller/shorter).
And yes, you can use the Object Browser to see what the Office Library makes available.