Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 166727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:08:55+00:00 2026-05-11T12:08:55+00:00

Is there a way to print all (*.cs) files in a solution at once,

  • 0

Is there a way to print all (*.cs) files in a solution at once, that is, without clicking on each of them and then hitting print?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T12:08:55+00:00Added an answer on May 11, 2026 at 12:08 pm

    From what I gather from a similar question asked elsewhere, this ‘feature’ is not build into Visual Studio.

    However it looks like MSDN has a macro you can use to print all of your code; perhaps you can use this, or something like it:

    Sub PrintItemsInSelectedProject()     Dim proj As Project     Dim objProj As Object()      objProj = DTE.ActiveSolutionProjects     If objProj.Length = 0 Then         Exit Sub     End If     proj = DTE.ActiveSolutionProjects(0)     PrintItemsInSelectedProject(proj.ProjectItems) End Sub  Private Sub PrintItemsInSelectedProject( _     ByVal projitems As ProjectItems)     Dim projitem As ProjectItem      For Each projitem In projitems         If (IsPrintableFile(projitem) = True) Then             If (projitem.IsOpen( _                     EnvDTE.Constants.vsViewKindTextView)) Then                 projitem.Document.PrintOut()             Else                 Dim doc As Document                 doc = projitem.Open( _                     EnvDTE.Constants.vsViewKindTextView).Document                 doc.PrintOut()                 doc.Close(vsSaveChanges.vsSaveChangesNo)             End If         End If         PrintItemsInSelectedProject(projitem.ProjectItems)     Next End Sub  Function IsPrintableFile( _         ByVal projItem As ProjectItem) As Boolean     Dim fileName As String     Dim extensions As _         New System.Collections.Specialized.StringCollection     ' If you add a file to your project that is of      ' a type that can be printed,      ' then add the extension of that      ' file type to this list.     Dim exts As String() = {'.cs', '.vb', _         '.aspx', '.xsd', '.xml', '.xslt', _         '.config', '.htm', '.html', '.css', _         '.js', '.vbs', '.wsf', '.txt', '.cpp', _         '.c', '.h', '.idl', '.def', '.rgs', '.rc'}      extensions.AddRange(exts)     fileName = projItem.FileNames(1)     Return extensions.Contains( _         System.IO.Path.GetExtension(fileName).ToLower()) End Function 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there an OS or user-account level modification for windows 7 that I can
UPDATE: I now have a solution I'm much happier with that, whilst not solving
My client wanted a way to offer downloads to users, but only after they
i'm trying to write a script which would process certain files. The data are
I want to substitute a certain filed of the text while keeping the same
I followed the advice received in a previous discussion ( Should "Library path" point
this question is from Codechef.com [if anyone is still solving this question dont look
folks. I've created a setup project in VS2008 which installs fine by itself. However
Does the the iPhone SDK allow fork() and pipe() , the traditional unix functions?
Updated According to comments: I have outlog.txt file which contains multiple filenames, e.g: 2345_535_Dell&HP_3PAR_DEAL.txt

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.