Merging documents with and with out headers

M

mlsrinivas

Hi,

I am trying to merge word documents from VB. I tried using Insert+File
and Copy & Paste methods. Both works perfect if I merge similar
documents. But as per the specs I need to merge documents of various
types (with header, with out header, different page settings,
different fonts etc), in short any format of word document, with out
losing the existing formatting.

During my search on web I have come to know that using Section break
with yield the required result. I tried with no luck.

Please help me crack this.

Thanks in advance

Srinivas
 
S

Stefan Blom

Basically, the article says that if you want to preserve section formatting
when copying and pasting, you will have to add a section break after the
contents you want to copy, and you should then copy and paste the contents
up to and including the break. And when using the Insert File dialog box,
you will have to insert a section break at the beginning and end of the
source document.
 
M

mlsrinivas

Stefan,

It didn't work for me.

Let me explain you what I tried. I opened the document with First page
header and added section break continuous (when i tried section break
next page, page header appeared on the new page). Then I opened the
second report that has no header and added the section break
continuous at the end. Copied the entire content including the break
and pasted in the first document.

Header appeared on the report also.

Please help, I am stuck with this.

Thanks

Srinivas
 
S

Stefan Blom

You will have to unlink the headers and footers of the section in the source
document before copying. If the source document only has one section, you
will have to insert a section before *and* after the text; then you can
access the Link to Previous / Same As Previous button on the Header and
Footer toolbar (for the section you want to to copy).

Note that you may have to temporarily insert a page break in order to see
all headers and footers in the target document (otherwise you cannot turn
off Link to Previous / Same As Previous).

For example:

<section break> <-- (1) Add this break
Text in source document to be copied along with its section formatting.
<page break> <-- (3) Add page break
<section break> <-- (2) Add this break

(4) For each type of header and footer, click Link to Previous / Same As
Previous to deselect the option.

(5) Copy the text, including the section break at (2).

(6) Paste into the target document.

Now it should work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top