PC Review


Reply
Thread Tools Rate Thread

Insert Files in Word Document

 
 
=?Utf-8?B?TWFyY29z?=
Guest
Posts: n/a
 
      6th Apr 2005
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(mFile, ref vazio, ref
vazio, ref vazio, ref vazio);
documentoFinal.Application.Selection.InsertBreak(ref 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 With Quote
 
 
 
 
macropod
Guest
Posts: n/a
 
      8th Apr 2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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(mFile, ref vazio, ref
> vazio, ref vazio, ref vazio);
> documentoFinal.Application.Selection.InsertBreak(ref 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 With Quote
 
 
 
 
=?Utf-8?B?TWFyY29z?=
Guest
Posts: n/a
 
      11th Apr 2005
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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(mFile, ref vazio, ref
> > vazio, ref vazio, ref vazio);
> > documentoFinal.Application.Selection.InsertBreak(ref 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I insert a Word document into another Word document in Word franj Microsoft Word Document Management 1 21st Jan 2009 03:48 AM
Insert a Word document into a Word document maintaining page layou abbey-king Microsoft Word Document Management 1 16th Dec 2008 01:52 PM
why won't the insert command work to insert a document in word =?Utf-8?B?QmFydA==?= Microsoft Word Document Management 0 26th Mar 2006 11:44 PM
Can I insert a word document into another word document? =?Utf-8?B?RGF2ZSBCZWhyZW5kcw==?= Microsoft Word Document Management 1 7th Jul 2005 01:37 AM
Document edited with MS word-2003; MS-word crashes if that document is opened with older MS word versions qazmlp Microsoft Word Document Management 2 27th Apr 2005 07:11 AM


Features
 

Advertising
 

Newsgroups
 


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