[AccessD] Automation Error

Stuart McLachlan stuart at lexacorp.com.pg
Fri Aug 25 20:08:04 CDT 2023


On 25 Aug 2023 at 8:27, Rocky Smolin wrote:
 
> Is there a link to the properties of the Word object? FontName without
> the dot was how the Word macro generated the code.
> 

VBE:
 View- Object Browser ( or F2)
Select "Word" in the first dropdown (in place of "<All Libraries>")
Scroll down in "Classes" to "Selection"
Scroll through  "Members of 'Selection' until you find Font (there is no Fontname)
In the lower pane you will see
Property Font as Font where the second "Font" is blue underlined (i.e. a link)
Click on that link
"Classes" jumps to Font and the right panel now shows all of the members of the  Font class 
(including Name)

Also note that when looking a class members you always need to work your way through the 
class hierachy a dot at a time.  The Word class also has a Font Property, but you need to 
make sure that Word.Selection does as well  since the Word.Font will not just apply to your 
selection. 





More information about the AccessD mailing list