spoo Posted June 21, 2021 Posted June 21, 2021 (edited) Hi All, I have a . docm word document , when I write the below code it give "Variable must be of type "Object".:" Error #include <Word.au3> $oWordApp = _Word_Create("D:\Documents\Word Doc API\Report Guide Sheet.docm") $oDoc = _Word_DocGet($oWordApp,1) global $w = $oDoc.Application----> throws error here ;ConsoleWrite(@error "error code is" &@CRLF) ; move there ;$oDoc.Bookmarks("Date 1").Select ; insert content ;$w.Selection.typetext("This is inserted at the bookmark") Please suggest what on what mistake I'm doing. Thanks in advance Edited June 21, 2021 by Jos
Developers Jos Posted June 21, 2021 Developers Posted June 21, 2021 You do have MS-Office installed ...right? Add a comm error handler to get better error info! Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now