Server script to send mail with attached Word document
Im working step by step in my project , I every time I solve a problem in my work ; I work with FM pro 11 Advanced and FM server Advanced. My database work in web browser .
I resolve many problems and I can now export records in a .XLS file , from the IWP to the server , then, Send the attached file (.XLS) to users. Explaining more the process: Many users work with My FM Database , whell , every one select records that he want to export from a layout ( Export record from a Table ) ; Then Every user receive a specific e-mail that contanit only records that selected before.
Whell; I want to do the same works ; But, with the WORD files ; I create an excel macro in my server , That allow to save records from an excel file to a WORD file ( Template.doc) , then , I want to e-mails to exery users , but , this time with the WORD attached files . The same works but with the Word files.
What the Excel macro do : Save records of each line from the Excel file to a new word document ans save it as the name of the 2nd Cell of the line j .; well , we can found 3 word documents that is copied from ONE excel file .
How Can I please Send this -emails , with the attached word file , to the good user every time . ??