Insert Files in Word Document

Discussion in 'Microsoft Word Document Management' started by Guest, Apr 6, 2005.

  1. Guest

    Guest Guest

    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?
     
    Guest, Apr 6, 2005
    #1
    1. Advertisements

  2. Guest

    macropod Guest

    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
    news:...
    > 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?
     
    macropod, Apr 8, 2005
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    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
    > news:...
    > > 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?

    >
    >
    >
     
    Guest, Apr 11, 2005
    #3
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. qazmlp
    Replies:
    2
    Views:
    810
    Sten Westerback
    Apr 27, 2005
  2. Guest

    Can I insert a word document into another word document?

    Guest, Jul 7, 2005, in forum: Microsoft Word Document Management
    Replies:
    1
    Views:
    295
    Anne Troy
    Jul 7, 2005
  3. Guest

    why won't the insert command work to insert a document in word

    Guest, Mar 26, 2006, in forum: Microsoft Word Document Management
    Replies:
    0
    Views:
    251
    Guest
    Mar 26, 2006
  4. abbey-king

    Insert a Word document into a Word document maintaining page layou

    abbey-king, Dec 16, 2008, in forum: Microsoft Word Document Management
    Replies:
    1
    Views:
    574
    Suzanne S. Barnhill
    Dec 16, 2008
  5. franj

    How do I insert a Word document into another Word document in Word

    franj, Jan 21, 2009, in forum: Microsoft Word Document Management
    Replies:
    1
    Views:
    714
    Kenneth
    Jan 21, 2009
Loading...

Share This Page