I have a Word VB macro that retrieves data from a database.
I would like to enhance it to have run-time options or parameters /
arguments that will cause the macro to retrieve different data and different
save as name, for example.
example:
I am running from DOS
"C:\Program Files\Microsoft Office\OFFICE11\winword.exe" /w
/mCreateRegularCatalogue
but it would be nice to add an argument or option for "christmas product" like
"C:\Program Files\Microsoft Office\OFFICE11\winword.exe" /w
/mCreateRegularCatalogue /"xmas"
or
"C:\Program Files\Microsoft Office\OFFICE11\winword.exe" /w
/mCreateRegularCatalogue /"complete"
Is there a way / is this possible ???
I don't want to create extra macros, just one macro to handle all options.
Any ideas ?
Thanks,
John
Toronto, Canada
Howard Kaikow - 05 Nov 2004 21:45 GMT
Macros are by definition Public subs that have no arguments.
I've never tried, so I do not know whether it can be done, perhaps, it is
possible for the macro to parse the command line.

Signature
http://www.standards.com/; See Howard Kaikow's web site.
> I have a Word VB macro that retrieves data from a database.
>
[quoted text clipped - 23 lines]
> John
> Toronto, Canada