PDA

View Full Version : Moving header into Main page



vpsekhar
10-01-2014, 09:41 AM
Hi Team,
I have one word document of around 400 pages. Each page has Header and Footer, which are displayed behind the

behind the page as given the ‘Actual Document’. In this page header and footer are showing in text boxes.
Now I need some macro which will
1) Copy the content of text box from header and paste it like ordinary text (instead of as text box) under the main page as

shown in the doc ‘Expected Result’.
2) Perform the same thing for Footer.
3) Point 1 and 2 should be carried out with all pages in word document

In this thread I am giving 2 attachments’, one is actual document which is the existing system. And the other document is

Expected document, which I am expecting after running a macro.


Any help on this concept is highly helpful to me.

macropod
10-01-2014, 11:28 PM
Why not simply save the document as a PDF, then re-import the content from the PDF into Word? A whole lot simpler than trying to code for this.

vpsekhar
10-01-2014, 11:40 PM
I found this issue while converting PDF to Word document. While converting to Word, by default last line of PDF showing as Footer in word document.Same thing happening in case of First line of PDF Document, showing as header in Word document. I tried to bring the Header and Footer into Front of page, but not so much success for me.

macropod
10-02-2014, 12:18 AM
I have never seen a PDF that would behave in this way. Everything copied from a PDF and pasted into a Word document always goes into whatever story range you paste into. So, if you paste into the document body, that's where everything ends up; none of it will end up in the Word document footer.

vpsekhar
10-02-2014, 03:59 AM
Its my bad that i am facing this issue. however is there any macro which will bring the text from header and Footer into main page. I am trying for it since from last couple of months , any help on this will save lots of my time.

gmayor
10-02-2014, 04:16 AM
The problem is that there are no 'pages' in a Word document. A document consists of text flowed between the margins to give the appearance of 'pages. If you then extract the header text and put it in the document body, you cause the document to reflow, which will play havoc with your page settings. Then when you repeat with the footers, the problem is made even worse. Word is not designed to be used like this.

The headers and footers are different story ranges. They are in effect superimposed over the document, like a pile of transparencies. They are not part of the document body.

For a short and simple document you could do it manually, adjusting for each change, but Paul's suggestion of using an interim format seems the most practical approach. If PDF is not doing it for you, then print the document and use a scanner in conjunction with OCR software to achieve the same end.

vpsekhar
10-03-2014, 05:31 AM
The problem is that there are no 'pages' in a Word document. A document consists of text flowed between the margins to give the appearance of 'pages. If you then extract the header text and put it in the document body, you cause the document to reflow, which will play havoc with your page settings. Then when you repeat with the footers, the problem is made even worse. Word is not designed to be used like this.

The headers and footers are different story ranges. They are in effect superimposed over the document, like a pile of transparencies. They are not part of the document body.

For a short and simple document you could do it manually, adjusting for each change, but Paul's suggestion of using an interim format seems the most practical approach. If PDF is not doing it for you, then print the document and use a scanner in conjunction with OCR software to achieve the same end.

Request you to share your mail Id, so that i can send the PDF document which i am using along with the Word document which i got after conversion. Just only to make things easy.

gmayor
10-03-2014, 05:46 AM
If you click 'Go Advanced' you can attach files to your message to the forum.

vpsekhar
10-03-2014, 06:49 AM
If you click 'Go Advanced' you can attach files to your message to the forum.

Please find the attachment which i got after conversion from PDF, i am unable to attach PDF File. While attaching PDF To system, getting an error message saying it as an Invalid format

macropod
10-03-2014, 02:01 PM
To attach a PDF file, zip it first.

FWIW, your attached document has headers that could not have come from the PDF via a simply copy/paste operation.

vpsekhar
10-03-2014, 04:25 PM
To attach a PDF file, zip it first.

FWIW, your attached document has headers that could not have come from the PDF via a simply copy/paste operation.

If at all i copy and Pasted, then header should display in an ordinary text, but it is showing in a text box. PFA For PDF Doc.12356

macropod
10-03-2014, 04:55 PM
The copy/paste did NOT produce the headers in your document - you added them yourself. Just as YOU added the page breaks, the Section breaks and the manual line breaks at the end of each line. You even have images in the document, some of which are images of text content in the PDF, including one that's linked to an external source. Copying & pasting from a PDF into Word CANNOT produce this result.

As for the PDF, it is apparently one you created back in 2003, using Word 5.1 and Adobe PDF Writer 4.

The document I get by just copying & pasting from your PDF is attached. Because of the way it was produced (using Adobe PDF Writer 4), it would evidently need a great deal of clean-up work to make it useful. None of the line wraps, paragraph spacing, etc., that one gets from a better PDF creator has been preserved.

vpsekhar
10-04-2014, 03:36 AM
The copy/paste did NOT produce the headers in your document - you added them yourself. Just as YOU added the page breaks, the Section breaks and the manual line breaks at the end of each line. You even have images in the document, some of which are images of text content in the PDF, including one that's linked to an external source. Copying & pasting from a PDF into Word CANNOT produce this result.

As for the PDF, it is apparently one you created back in 2003, using Word 5.1 and Adobe PDF Writer 4.

The document I get by just copying & pasting from your PDF is attached. Because of the way it was produced (using Adobe PDF Writer 4), it would evidently need a great deal of clean-up work to make it useful. None of the line wraps, paragraph spacing, etc., that one gets from a better PDF creator has been preserved.


Thanks for the reply, word document which i shared with you is the one i got after conversion from PDF by using one of the leading tool in Market. Even though there is no header in PDF, header is displaying in word document. Is there any option to bring the header as part of main page, in a simple text format. Not in the form of Text box image.

macropod
10-04-2014, 03:49 AM
As far as I am concerned, you are just wasting my time - and yours. I said to copy & paste from the PDF into Word, not to use some whiz-bang conversion tool that quite obviously doesn't do what you want...

I'm done with this thread.