I have to create a active x dll to be called from a VB exe as well ASP. This dll will be registered on a Win NT server. The VB exe will run as a scheduled process without user interaction whereas the ASP interface will accept user input. But both use the same component.

My first question is whether it is advisable to use the same component for the exe as well as the ASP file.

Second:
What the component should do is - retrieve values from a database, open an rtf file (contains a letter) insert the data in place of some tags in the letter and then print it to the default printer on the server or the printer specified by the user. I thought of using the FileSystemObject. But this does not provide a replace method. Also how can i print this file to the default printer or one specified by the user?