Can you tell me if it is possible to create Macro's in the script rather than in the Edit Module?
No, VB macros cannot be defined in the script.
But what do you want to do? If you want a subroutine in the script, then you can indeed define that in the script. Look in the documentation for the Sub .. End sub statement.
Retrieving data ...