Yet again .. word automation

Can anyone tell me if it’s possible to return a value from a word macro? I have successfully opened Word up through automation, run a macro to populate the document but now, I want to be able to return to Navision a true/false or even a string value. Is this possible?

I haven’t been able to find a way to do this. Sometimes opening word documents or excel documents from navision which have stored macros on them can cause enough of a problem. Maybe if Microsoft buy Navision then they’ll provide something like this for us!!! Edited by - StoneRose on 2002 May 01 13:27:12

Hi, use CREATE function for Automation in Navision. That will return boolean value to Navision.TRUE if successfully open and FALSE in case error founds.

It turned out to be that my code in the VB macro was incorrect. Because Ive coded in several languages I forgot that when exiting a VBA function, you need to write “Function name = value” to return the value! ie: Function Return(IntVar As Integer) As Boolean IF IntVar >=10 THEN Return = true ELSE Return = false END IF End Function So, my mistake! Anyway, thanks for your help. Regards