Click here to Skip to main content
15,940,246 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have created a win service app which for generating a word report from given values and have completed that with the help of codeproject
now want to send the created word report to a desired mail id every month

referred Quartz and not got any idea from that any other method to do that by calling the Word document creating method into it

What I have tried:

just want to know the method to do that
Richard Deeming 11-Aug-22 4:34am    
Rather than writing a Windows service, which is running all the time, just to execute a task on a schedule, why not write a simple console application to execute the task, and use the built-in Windows Task Scheduler to schedule it to run at the desired time?

Apart from anything else, that will let you change the schedule at any point without having to recompile your code.
Manojkumar-dll 11-Aug-22 4:37am    
That's a nice one
but don't wanna create separate app for it instead of that need to use the service for both scheduler and interop
any suggestion regarding that
Thank you

note: i have used interop for word document generation
Richard Deeming 11-Aug-22 9:41am    
Then you need to read this:
Considerations for server-side Automation of Office[^]
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900