Word document process within stored procedure

Hi experts,
I want to insert footer to a word document from SQL Procedure, is it possible? Please let me
We have the footer text stored in one of our tables in our database, which has to become the footer in a word document when a stored procedure gets executed.

Many thanks in advance,

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I guess it is not possible from SQL Server directly, however you can do it with the help of Office API from within .NET. you may get that value from table to C# dataset or dataTable and write footer from that DataTable to word file.
samalrajAuthor Commented:
Hi RiteshShah,
Thanks for quick response. I appreciate your help
My requirement is that a stored procedure will execute periodically and it has to go through all the word documents stored in a folder and insert some footer text to it.
Is it something like that possible?


yes, if you create windows service in C# and call that service at specific time and it will do it.
samalrajAuthor Commented:
Hi Ritesh,

Thanks again for your help,
Is it possible to call the C# program from within stored procedure? because the stored procedure may have to executed/called manually.

I appreciate if you can post some example code.

no, C# couldn't be call from SP but you have to call SP from C#

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.