Results 1 to 2 of 2

Thread: word programming problem with landscape

  1. #1
    Junior Member
    Join Date
    Jan 2005
    Posts
    1

    Exclamation word programming problem with landscape

    I have a problem with landscape pages in word document.

    I am creating a word document using asp programming.

    I want to set n. page as a landscape. But I can not do it.

    for example I want to set first 3 page as a portrait then 4th page landscape and then 5th page as a portrait again.

    There is a code like

    objWord.Application.Selection.PageSetup.Orientation = 1

    But it set all pages as a landscape. (

    I just want to set only the active page as a landscape.

    There is a macro option like makes landscape this point forward not all document. But I can not do this in asp programming.

    How can I solve the problem?

    Thanks in advance.

    Metin

  2. #2
    Junior Member
    Join Date
    Sep 2006
    Posts
    1
    I have the same problem too, but i used asp.net to do that.
    .............
    Response.Write("@page Section1 {size:595.45pt 841.7pt;margin:1.0in 1.25in 1.0in 1.25in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}")
    Response.Write("div.Section1 {page:Section1;}")
    Response.Write("@page Section2 {size:841.7pt 595.45pt;mso-page-orientation:landscape;margin:1.25in 1.0in 1.25in 1.0in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}")
    Response.Write("div.Section2 {page:Section2;}")
    ............

    'this is portrait
    Response.Write("<div class=Section1>")
    .................

    'this is landscape

    Response.Write("<span style='font-size:12.0pt;font-family:""Times New Roman"";mso-fareast-font-family:""Times New Roman"";mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso(-bidi - language) : AR(-SA) '><br clear=all style='page-break-before:always;mso(-break - Type) : section(-break) '></span>")

    Response.Write("<div class=Section2>")

    It runs, but always get last clalss to set on default page (it uses "<div class=Section2>", not "<div class=Section1>"), any one helps me please!
    Thanks.
    Last edited by juventush; 09-10-06 at 10:45 PM.

Similar Threads

  1. A Problem with Microsoft's Word 2000?
    By Sting in forum Software Forum
    Replies: 10
    Last Post: 12-18-04, 08:02 AM
  2. My first problem
    By Shagster in forum Software Forum
    Replies: 4
    Last Post: 06-27-02, 02:06 AM
  3. The
    By Chris in forum General Discussion Board
    Replies: 7
    Last Post: 03-30-02, 12:34 PM
  4. something to do
    By lord_yuri in forum General Discussion Board
    Replies: 12
    Last Post: 01-01-02, 06:47 PM
  5. Really weird network problem
    By percy in forum Networking Forum
    Replies: 2
    Last Post: 07-02-01, 07:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •