Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Automatically adding headers and footers in print documents

Automatically adding headers and footers in print documents

Scheduled Pinned Locked Moved Visual Basic
6 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wildfire2323
    wrote on last edited by
    #1

    I would like to create a print function that will automatically put headers and footers on the document. This will be used to print out quotes to send to customers. The headers and footer will contain the company logo, address, etc, and needs to be in color. The body of the document will come from a text file that will be imported. I would like to also set a specific line that it should start at when it brings in the text file or prints it off. The way I see it working is that it uses Word objects to create the final document once all parts are put together.

    M D 2 Replies Last reply
    0
    • W wildfire2323

      I would like to create a print function that will automatically put headers and footers on the document. This will be used to print out quotes to send to customers. The headers and footer will contain the company logo, address, etc, and needs to be in color. The body of the document will come from a text file that will be imported. I would like to also set a specific line that it should start at when it brings in the text file or prints it off. The way I see it working is that it uses Word objects to create the final document once all parts are put together.

      M Offline
      M Offline
      mr_lasseter
      wrote on last edited by
      #2

      That's good. What is your question?

      Mike Lasseter

      W 1 Reply Last reply
      0
      • M mr_lasseter

        That's good. What is your question?

        Mike Lasseter

        W Offline
        W Offline
        wildfire2323
        wrote on last edited by
        #3

        How do I do it?

        1 Reply Last reply
        0
        • W wildfire2323

          I would like to create a print function that will automatically put headers and footers on the document. This will be used to print out quotes to send to customers. The headers and footer will contain the company logo, address, etc, and needs to be in color. The body of the document will come from a text file that will be imported. I would like to also set a specific line that it should start at when it brings in the text file or prints it off. The way I see it working is that it uses Word objects to create the final document once all parts are put together.

          D Offline
          D Offline
          Duncan Edwards Jones
          wrote on last edited by
          #4

          Bear in mind that if you use MS-Word to do this then your users will need to have MS-Word installed on their machine to print out. Instead you could create the document template in code using the .NET PrintDocument class - I have written a couple of articles on this site that do that....

          '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

          W 1 Reply Last reply
          0
          • D Duncan Edwards Jones

            Bear in mind that if you use MS-Word to do this then your users will need to have MS-Word installed on their machine to print out. Instead you could create the document template in code using the .NET PrintDocument class - I have written a couple of articles on this site that do that....

            '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

            W Offline
            W Offline
            wildfire2323
            wrote on last edited by
            #5

            I would be more than willing to do that. Can you please send me a link to the article that most closely deals with this. Thanks

            D 1 Reply Last reply
            0
            • W wildfire2323

              I would be more than willing to do that. Can you please send me a link to the article that most closely deals with this. Thanks

              D Offline
              D Offline
              Duncan Edwards Jones
              wrote on last edited by
              #6

              There's an article at this site[^] and a newer version of the source code (with a rudimentary effort of a graphical designer) on VBForums[^]

              '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups