Issue creating different first page in word doc

J

Job Lot

I need a different first page in my word document. First page should have
image in the header and a line across the page in the footer. I am using the
following code but it does not show me the line on the first page. When I
press Ctrl + Enter to create a new page it shows the line on the new page. If
I change the code to show some image in the footer instead of a line it works
alrite. What is going wrong here please help!!!



Thanks



PageSetup.DifferentFirstPageHeaderFooter = -1;


Sections[1].Headers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterFirstPage].Shapes.AddPicture(@"C:\Image\abc.jpg",
ref missing, ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing);


Sections[1].Footers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterFirstPage].Shapes.AddLine(35f, 500f, 400, 500f, ref missing);
 
J

Job Lot

Hi Terry

Different First Page option in Page Setup does not work either.

Thanks

Terry Farrell said:
Have you checked the Different First page option in Page Setup? See the
following for some help with this: FAQ on how to create a letterhead on just
the front page. http://home.earthlink.net/~wordfaqs/Letterhead.htm

--
Terry Farrell - MS Word MVP

Job Lot said:
I need a different first page in my word document. First page should have
image in the header and a line across the page in the footer. I am using
the
following code but it does not show me the line on the first page. When I
press Ctrl + Enter to create a new page it shows the line on the new page.
If
I change the code to show some image in the footer instead of a line it
works
alrite. What is going wrong here please help!!!



Thanks



PageSetup.DifferentFirstPageHeaderFooter = -1;


Sections[1].Headers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterFirstPage].Shapes.AddPicture(@"C:\Image\abc.jpg",
ref missing, ref missing, ref missing, ref missing, ref missing, ref
missing,
ref missing);


Sections[1].Footers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterFirstPage].Shapes.AddLine(35f,
500f, 400, 500f, ref missing);
 
T

Terry Farrell

It does work. Read the other FAQ I pointed you to as it explains the
procedure in the clearest of steps.

Terry

Job Lot said:
Hi Terry

Different First Page option in Page Setup does not work either.

Thanks

Terry Farrell said:
Have you checked the Different First page option in Page Setup? See the
following for some help with this: FAQ on how to create a letterhead on
just
the front page. http://home.earthlink.net/~wordfaqs/Letterhead.htm

--
Terry Farrell - MS Word MVP

Job Lot said:
I need a different first page in my word document. First page should
have
image in the header and a line across the page in the footer. I am
using
the
following code but it does not show me the line on the first page. When
I
press Ctrl + Enter to create a new page it shows the line on the new
page.
If
I change the code to show some image in the footer instead of a line it
works
alrite. What is going wrong here please help!!!



Thanks



PageSetup.DifferentFirstPageHeaderFooter = -1;


Sections[1].Headers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterFirstPage].Shapes.AddPicture(@"C:\Image\abc.jpg",
ref missing, ref missing, ref missing, ref missing, ref missing, ref
missing,
ref missing);


Sections[1].Footers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterFirstPage].Shapes.AddLine(35f,
500f, 400, 500f, ref missing);
 

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