Reply
 
Thread Tools Display Modes
  #1   Report Post  
Marcos
 
Posts: n/a
Default Insert Files in Word Document

I have a code that merge some .doc files into one .doc file. the code is just
like this:

foreach(string mFile in mFiles)
{
documentoFinal.Application.Selection.InsertFile(mF ile, ref vazio, ref
vazio, ref vazio, ref vazio);
documentoFinal.Application.Selection.InsertBreak(r ef oBreak);
}

But the format of the Headers and Footnotes cam always with the first file
that I input! Why he do that and how can I solve this problem?
  #2   Report Post  
macropod
 
Posts: n/a
Default

Hi Marcos,

To have different headers and footers, each added document would have to
follow a section break with the 'same as previous' value set to false for
both the header and the footer. Then you can add the headers and footers for
each document.

Cheers


"Marcos" wrote in message
...
I have a code that merge some .doc files into one .doc file. the code is

just
like this:

foreach(string mFile in mFiles)
{
documentoFinal.Application.Selection.InsertFile(mF ile, ref vazio, ref
vazio, ref vazio, ref vazio);
documentoFinal.Application.Selection.InsertBreak(r ef oBreak);
}

But the format of the Headers and Footnotes cam always with the first file
that I input! Why he do that and how can I solve this problem?



  #3   Report Post  
Marcos
 
Posts: n/a
Default

Hey Macropod!

Thanks for your help, but I did not understood wher should I change this
value you called "'same as previous' value". I looked in the InsertFile and
in the InsertBreak, but that wasn´t a parameter with that name.

I tried to insert a section break of the type
Word.WdBreakType.wdSectionBreakContinuous, but still it doesn´t work.

Thanks in advance
Marcos

"macropod" wrote:

Hi Marcos,

To have different headers and footers, each added document would have to
follow a section break with the 'same as previous' value set to false for
both the header and the footer. Then you can add the headers and footers for
each document.

Cheers


"Marcos" wrote in message
...
I have a code that merge some .doc files into one .doc file. the code is

just
like this:

foreach(string mFile in mFiles)
{
documentoFinal.Application.Selection.InsertFile(mF ile, ref vazio, ref
vazio, ref vazio, ref vazio);
documentoFinal.Application.Selection.InsertBreak(r ef oBreak);
}

But the format of the Headers and Footnotes cam always with the first file
that I input! Why he do that and how can I solve this problem?




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
1st word in heading flush left second word flush right Elin New Users 9 April 4th 05 08:44 PM
creating forms Fluffypink Microsoft Word Help 4 March 9th 05 04:17 PM
In typing dates in Word, i.e. "January 12" how do you keep the "1. Carol Microsoft Word Help 2 January 12th 05 08:09 PM
WP Delay Code - Word Equiv Mike G - Milw, WI Microsoft Word Help 6 January 10th 05 04:12 PM
How to change merge forms from Word Perfect to Microsoft Word dollfindance Microsoft Word Help 2 December 30th 04 03:35 PM


All times are GMT +1. The time now is 03:45 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"