[AccessD] Automation Error

Stuart McLachlan stuart at lexacorp.com.pg
Thu Aug 24 18:21:04 CDT 2023


Do you have the correct "Microsoft Word XX.X Object Library" checked in VBE- Tools - 
References? 

On 24 Aug 2023 at 15:53, Rocky Smolin wrote:

> Dear List:
> 
> I'm trying to create a word doc through automation from an A2010 app.
> Early binding.
> 
> Code snip:
>     Dim wordApp As Word.Application
>     Dim myDoc As Word.Document
> 
>     Set wordApp = CreateObject("Word.Application")
> 
> I get an Automation Error: library not registered.  On advice from
> Edge I renamed the Word folder in the registry. Restarted Word. The
> registry was recreated. But still the same problem.
> 
> I got out my old A2010 CD and ran a repair. No cigar.
> 
> Suggestions?
> 
> I originally went with late binding but ran into a problem with
> setting font size and alignment.
> 
> The code
> 
>     'wordApp.Selection.FontName = "Book Antiqua"
>     'wordApp.Selection.Font.Size = 18
>     'wordApp.Selection.ParagraphFormat.Alignment = 1
> 
> won't compile. Says Object Won't Support this Property or Method.
> 
> I got that code by recording a macro in Word and cribbing the code
> from the macro (always worked with excel but I was always using early
> binding).
> 
> So there's two problems.
> 
> If I can solve the second one I'll go with late binding. If I can
> solve the first one, assuming that the solution will make the setting
> of font size and alignment resolves, I'll use early binding. But I
> think without the object library registered it won't work anyway.
> 
> Ideas?
> 
> MTIA
> 
> Rocky
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list