How to export VS solution to word?

Stesvis 1,041 Reputation points
2021-06-01T18:15:26.743+00:00

I know, it's a weird question and you're wondering...why??

Our company is looking to certify ownership of a project, and long story short, one of the things we have to provide is a word document containing all the source code (don't ask me why, lawyers said we have to do so).

So i am wondering if there are any tools (other programs or VS extensions) that could do this for me because copy & paste is not an option unless i want to waste days of work for this..

Fingers crossed for a solution, thanks!

Developer technologies Visual Studio Other
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 60,161 Reputation points
    2021-06-01T18:19:41.367+00:00

    Powershell (or any scripting language) can do it. Enumerate the source files one by one and add each one to the end of a word document. For that you'd need to use the Word API but that is pretty straightforward. Of course you'll likely want to customize it to put the filename before or after each listing but that should be straightforward.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.