SW doesnt have the 'Application' OLE interface, and doesnt allow 'embedded' macros like you'd see in Excel or Acad.
The 3 ways I know of doing it are:
1) using the "-m" param
2) Making an addin
3) Making a macro feature. This last one doesnt really get
loaded at startup, but if you code for the regen event, will
basically get called right after the document is loaded.