How to set the header for second page

Hello all,
I'm trying to set different header for first page and page number should starts from second page.
Below is the sample code to set the header for each and every page.
DECLARE
hApplication OLE2.OBJ_TYPE;
hWindow OLE2.OBJ_TYPE;
hPane OLE2.OBJ_TYPE;
hView OLE2.OBJ_TYPE;
hDocuments OLE2.OBJ_TYPE;
hDocument OLE2.OBJ_TYPE;
hSelection OLE2.OBJ_TYPE;
hParagraphFormat OLE2.OBJ_TYPE;
hRange OLE2.OBJ_TYPE;
hFields OLE2.OBJ_TYPE;
hFont OLE2.OBJ_TYPE;
args OLE2.LIST_TYPE;
wdAlignParagraphLeft CONSTANT number(3) := 0;
wdAlignParagraphCenter CONSTANT number(3) := 1;
wdAlignParagraphRight CONSTANT number(3) := 2;
wdSeekCurrentPageHeader CONSTANT number(3) := 9;
wdSeekCurrentPageFooter CONSTANT number(3) := 10;
wdSeekMainDocument CONSTANT number(3) := 0;
wdFieldPage CONSTANT number(3) := 33;
wdFieldNumPages CONSTANT number(3) := 26;
wdPageBreak CONSTANT number(3) := 7;
wdStory CONSTANT number(3) := 6;
myTab CONSTANT varchar2(1) := chr(9);
myBlue CONSTANT number(8) := 16711680; --FF0000
myGreen CONSTANT number(8) := 65280; --00FF00
myRed CONSTANT number(8) := 255; --0000FF
myDkGreen CONSTANT number(8) := 32768; --008000
myBlack CONSTANT number(8) := 0; --000000
myText varchar2(2000);
BEGIN
hApplication:=OLE2.CREATE_OBJ('Word.Application');
OLE2.SET_PROPERTY(hApplication, 'Visible', 1);
hDocuments := OLE2.GET_OBJ_PROPERTY(hApplication, 'Documents');
hDocument := OLE2.INVOKE_OBJ(hDocuments, 'Add');
-------- Create Header and Footer --------
hWindow := OLE2.GET_OBJ_PROPERTY(hApplication, 'ActiveWindow');
hPane := OLE2.GET_OBJ_PROPERTY(hWindow, 'ActivePane' );
hView := OLE2.GET_OBJ_PROPERTY(hPane, 'View' );
---- Header Section ---
OLE2.SET_PROPERTY(hView, 'SeekView', wdSeekCurrentPageHeader);
hSelection := OLE2.GET_OBJ_PROPERTY(hApplication, 'Selection');
hFont := OLE2.GET_OBJ_PROPERTY(hSelection, 'Font');
OLE2.SET_PROPERTY(hFont, 'Name', 'Times New Roman');
OLE2.SET_PROPERTY(hFont, 'Size', 10);
OLE2.SET_PROPERTY(hFont, 'Bold', FALSE);
OLE2.SET_PROPERTY(hFont, 'Color', MyBlue );
hParagraphFormat := OLE2.GET_OBJ_PROPERTY(hSelection, 'ParagraphFormat');
OLE2.SET_PROPERTY(hParagraphFormat, 'Alignment', wdAlignParagraphCenter);
OLE2.RELEASE_OBJ(hParagraphFormat);
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'This is a');
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.INVOKE(hSelection, 'TypeParagraph');
OLE2.SET_PROPERTY(hFont, 'Size', 16);
OLE2.SET_PROPERTY(hFont, 'Bold', TRUE);
OLE2.SET_PROPERTY(hFont, 'Color', MyDkGreen );
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'Test Header');
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
---- Footer Section ----
OLE2.SET_PROPERTY(hView, 'SeekView', wdSeekCurrentPageFooter);
hParagraphFormat := OLE2.GET_OBJ_PROPERTY(hSelection, 'ParagraphFormat');
OLE2.SET_PROPERTY(hParagraphFormat, 'Alignment', wdAlignParagraphCenter);
OLE2.RELEASE_OBJ(hParagraphFormat);
hFields := OLE2.GET_OBJ_PROPERTY(hSelection, 'Fields');
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'Page ');
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
hRange := OLE2.GET_OBJ_PROPERTY(hSelection, 'Range');
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG_OBJ(args, hRange);
OLE2.ADD_ARG(args, wdFieldPage);
OLE2.INVOKE(hFields, 'Add', args );
OLE2.DESTROY_ARGLIST(args);
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, ' of ');
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
hRange := OLE2.GET_OBJ_PROPERTY(hSelection, 'Range');
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG_OBJ(args, hRange);
OLE2.ADD_ARG(args, wdFieldNumPages);
OLE2.INVOKE(hFields, 'Add', args );
OLE2.DESTROY_ARGLIST(args);
OLE2.RELEASE_OBJ(hRange);
OLE2.RELEASE_OBJ(hFields);
OLE2.SET_PROPERTY(hView, 'SeekView', wdSeekMainDocument);
OLE2.RELEASE_OBJ(hView);
OLE2.RELEASE_OBJ(hPane);
OLE2.RELEASE_OBJ(hWindow);
-------- Insert Text --------
hFont := OLE2.GET_OBJ_PROPERTY(hSelection, 'Font');
OLE2.SET_PROPERTY(hFont, 'Name', 'Arial');
OLE2.SET_PROPERTY(hFont, 'Size', 12);
OLE2.SET_PROPERTY(hFont, 'Bold', FALSE );
OLE2.SET_PROPERTY(hFont, 'Color', myBlack );
OLE2.INVOKE(hSelection, 'TypeParagraph');
myText := myTab || 'This text is on the ';
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, myText);
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.SET_PROPERTY(hFont, 'Bold', TRUE);
OLE2.SET_PROPERTY(hFont, 'Color', myRed);
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'first ');
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.SET_PROPERTY(hFont, 'Bold', FALSE);
OLE2.SET_PROPERTY(hFont, 'Color', myBlack );
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'page.');
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, wdPageBreak);
OLE2.INVOKE(hSelection, 'InsertBreak', args);
OLE2.DESTROY_ARGLIST(args);
----page 2
myText := myTab || 'This text is on the ';
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, myText );
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.SET_PROPERTY(hFont, 'Bold', TRUE);
OLE2.SET_PROPERTY(hFont, 'Color', myBlue);
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'second ');
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.SET_PROPERTY(hFont, 'Bold', FALSE);
OLE2.SET_PROPERTY(hFont, 'Color', myBlack );
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 'page.');
OLE2.INVOKE(hSelection, 'TypeText', args);
OLE2.DESTROY_ARGLIST(args);
---- go to the top of the first page
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, wdStory);
OLE2.INVOKE(hSelection, 'HomeKey', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.RELEASE_OBJ(hFont);
OLE2.RELEASE_OBJ(hSelection);
OLE2.RELEASE_OBJ(hDocument);
OLE2.RELEASE_OBJ(hDocuments);
OLE2.RELEASE_OBJ(hApplication);
END;
Please help me out
Thanks,
Bhavana

Click on --
Edit link for Page> Click "Edit Default" link on Banner >
Under the "Banner Links"
provide value something like this:
Label = Help
URL = /pls/portal30/docs/myhelp.html
Icon = U can upload any icon here.
For Application Components = See the Second Last tab on "Edit Component".
Thanx,
Chetan.

Similar Messages

  • How to set the #HELPLINK# for a page

    I tried to find, how or where can I set the #HELPLINK# for each individual page/application component?

    Click on --
    Edit link for Page> Click "Edit Default" link on Banner >
    Under the "Banner Links"
    provide value something like this:
    Label = Help
    URL = /pls/portal30/docs/myhelp.html
    Icon = U can upload any icon here.
    For Application Components = See the Second Last tab on "Edit Component".
    Thanx,
    Chetan.

  • How to set different header for different Standard report page

    How to set different header for different Standard report page

    Hi,
    A easy answer would be use the 'set report header text.vi' but maybe you are talking about something else ?

  • How to set the number of seconds a servlet is allowed to run

    I use JSP to generate a report, but it will take about 10 minutes to search.
    IE Client screen displays an error message what is "Cannot find out your page" after 8 minutes. How to set the number of seconds a servlet is allowed to run.

    It's not a matter of how long the servlet is running... it's the browser timing out because the servlet hasn't responded to its request.
    You have several options:
    1) "Browser Pinging"
    Your servlet sends some small data which can be either seen or unseen (html comments, hidden chars, etc) by the user at short intervals while your report is running. When the report is finished, the browser will not have timed out because it has been "snacking" on those small bits of data which tell the browser its original request was both heard and being handled. I don't think there is any timeout in IE as long as it receives data continually (or at least before its own timeout mark over and over again...)
    2) Multithreaded processing
    This would probably be a better approach. Have the report run in a separate thread running on the server. You'd want to store a reference to this executing report in the user's session. Instead of making the browser wait for the report to be finished, have the servlet check the user's session to see if a report exists and is running. If one does not exist, create one and start its execution. If one does exist, and is still running, print a "please wait" type of message OR an animation, etc... along with some javascript which will reload the page every few seconds. If the page reloads and the servlet sees that the report is finished, it can then display it to the user.
    Hope this helps,
    -Scott

  • How to set the header variables in weblogic

    Hi,
    We have a following set up in our environment.
    We have weblogic and on the top of it we have apex listener deployed which redirects Oracle Apex.
    My Issue:
    How can we set up the header variables in weblogic once the user is authenticated against weblogic server.
    We are struck here, not knowing how to set the header variables in weblogic server. Its fairly straight forward for Oracle Access Manager or others..
    Thanks
    Ramesh P.

    maybe you are looking for the routing options
    http://docs.oracle.com/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html#wp1125348

  • How to enable root on mac on 10.9.2 and how to set the password for the same ?

    how to enable root on mac on 10.9.2 and how to set the password for the same ?

    http://support.apple.com/kb/ht1528
    Follow the steps for Lion.
    But, why are you doing this? I've never found the need to do that.

  • How to boldface the header for ONE column

    hi,
    I want to know how to boldface the header for ONE column. The following will boldface the header for all the columns in the table
    table.getTableHeader().setFont(new java.awt.Font("Dialog", 1, 12));
    Thanks.
    Jrabi

    jtable.getColumnModel().getColumn( indexOfBoldColumn ).setHeaderRenderer( TableCellRenderer aRenderer )

  • How to set the conditions for item deletion approval workflow?

    Hi,
    I have created approval workflow for item modifications ie, when user try to modify an item, it will send a mail to Project Manager. For that I set the conditions in Change the behavior of the overall task: 1. When the task process starts 2 . When the task
     process completes .
    Change the behavior of the single task: 1.when a task is Pending.
    [I followed this https://www.nothingbutsharepoint.com/sites/eusp/Pages/5-Steps-to-Enhance-SharePoint-2010-Approval-Workflow.aspx ]
    My Requirement is that I want to set this same workflow for the scenario: when the user deletes an item it will send a mail (intimation mail for item deletion) to Project Manager. here i dont want to send modification mails when user deletes an item.
    When user modifies an item: 1. intimation mail, 2. Approve/Reject mail 3. intimation for approval / rejection mail.
    When user deletes an item: 1. intimation mail.
    How can we set it in one approval workflow?? where i have to set the condition for sending either item modification mails or deletion mail.
    Thanks,
    Praveen ji

    Hi,
    According to your post, my understanding is that you wanted to start approval workflow when item deleted.
    You should first make some changes to trigger the workflow when you delete the item.
    You can use the Event Receiver to achieve it.
    In order to trigger workflow on item delete you need to create event receivers and from event receiver call the workflow already attached with list.
    http://ravendra.wordpress.com/sharepoint-workflow-on-list-item-delete/
    You can also create custom action to start the workflow, you can refer to the following article, then modify the workflow as your need.
    http://blogs.sharepoint911.com/blogs/jennifer/Lists/Posts/Post.aspx?ID=50
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to set the size for height of iView tray?

    Hi,
    I have created a ABAP webdynpro component and integrated this comp with iView. Then i integrated iView into Page in portal. That is working fine.
    But the size of tray/window which is displayed in the page is very small.
    How to increase the height of that Tray/window/iView containing my component?

    Hi,
    By changing the maximum automatic height and Minimum automatic height property of the iview you can set the size for height of your iview.
    to do this follow the setps:
    goto content administrator -> portal content -> your folder where you created your iview or directly to your iview -> right click -> open -> object,
    and now in property category choose appearance-Size from the drop down menu and set the above properties to your required height.
    if you want the end user to modify this property set the property to read/write .
    *********please reward points if the information is helpful to you********************

  • How to set the width for a selectManyShuttle component

    Hi,
    I'm using selectManyShuttle component from Oracle ADF Core and some of the items in the showing list are long, therefore the width of selectManyShuttle expands the page. How to set the width property for selectManyShuttle component? After that does selectManyShuttle provide horizontal scrollbar as well?
    Thanks in advance,
    lapi
    Message was edited by:
    [email protected]
    Message was edited by:
    [email protected]

    Solution here:
    Re: ADF Faces Scrollable Panel or Scroll Bar inside a component
    Regards
    Grant

  • How 2 Set the logic for report 2 run 1st of everymonth......

    Hi Experts,
    i ve developd a HR-ABAP report in that Some part of code will Mon-Fri, Excluding Public holidays and sat & sundays...( i.e no public holidays and no sat & sundays)
       and some part of should Run on 1st of everymonth.... but 2 parts of code should be in same report..
    How can set the logic to run the report respective times....
    Thanks in Advance....
    sudeer.

    you can code this but need some good expertise on fm's  , date handling techniques and subroutine call coding.
    1.
    to make the code run only on 1st of every month
    capture the rundate of ur prog .. take value of  sy-datum
    ex.. 01.xx.yyyy
    or date std will be yyyymmdd so check for dd = 01 ..
    so per logic first two chars show that its first of any month in any year ..
    if yes
    execute the logic for the first of every month ..
    endif.
    2.
    where the code needs to be run on mon-fri and not on public holidays / sun / sat ..
    first fetch the day based on date .. like mon or tue or wed .. except sat and sun..
    second check whether if m-t-w-th-fr if any of them is  a holiday or not
    u need to check the date in the calender list like tholi thoc and .. to check whether that is a holiday or not ..
    coming to sat and sundays .. u need to check the day for date using function modules and build the logic ...
    br,
    vijay..

  • How to set the bind variable on page load and execute query ?

    Hi All,
    I am using Jdeveloper 11.1.1.5
    I have a table called "Employee"
    Columns :- id , name , location
    Data :- 1, ,james , chicago
    2 ,Raj ,capetown
    Now i have another webservice(created as a webservice dataControl) which sends me the "id" on each time my page loads.Now the id which has been returned by webservice should be incorporated in my VO Query as in where clause to fetch the data for the respective "id" in that "Employee" table and should be rendered on form.
    Eg :- Id "2" has been sent by the webservice then the record should be fetched from database should be "2","raj","capetown".
    I know that there would be necessity of bind variable , but how do i set the bind variable on page load ?
    How can i use the bind variable appropriately ??
    Please suggest !!!!
    Thanks.

    Hi,
    Check
    http://www.orastudy.com/oradoc/selfstu/fusion/web.1111/b31974/web_services.htm#CJADCDBG
    http://thepeninsulasedge.com/frank_nimphius/2011/02/18/adf-code-corner-sample-73-released-hands-on-creating-a-search-form-using-a-pojo-ws-and-the-web-service-data-control/
    -Suresh

  • How to set the background for all components?

    hi
    Does anybody know how to set the DEFAULT background color in an application.. I need it because in jdk 1.3 the default bgcolor is grey and in 1.5 it is white.. and I wish white as well.. so to make it also white in jdk 1.3 I need to use the (a bit annoying) anyContainer.setBackground( Color.white ); and these are lots in my app.. So my question is: is there such an overall class with a function (say UIManager.setComponentsBackground( Color color ) ) for such a purpose?
    any tip or link would be greatly appreciated

    Does anybody know how to set the DEFAULT background color in an applicationthis might get you close
    import java.awt.*;
    import javax.swing.*;
    import java.util.Enumeration;
    class ApplicationColor extends JFrame
      public ApplicationColor()
        setApplicationColor(Color.RED);
        setLocation(400,300);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        JPanel jp = new JPanel(new BorderLayout());
        jp.add(new JTextField("I'm a textfield"),BorderLayout.NORTH);
        jp.add(new JComboBox(new String[]{"abc","123"}),BorderLayout.CENTER);
        jp.add(new JButton("I'm a button"),BorderLayout.SOUTH);
        getContentPane().add(jp);
        pack();
      public void setApplicationColor(Color color)
        Enumeration enum = UIManager.getDefaults().keys();
        while(enum.hasMoreElements())
          Object key = enum.nextElement();
          Object value = UIManager.get(key);
          if (value instanceof Color)
            if(((String)key).indexOf("background") > -1)
              UIManager.put(key, color);
      public static void main(String[] args){new ApplicationColor().setVisible(true);}
    }

  • How to set the icon for the entire application with JFrame.setIconImage

    I set the icon on the main frame using JFrame.setIconImage(). The icon is shown properly in the main frame.
    If more JFrames are opened from the main frame, the newly opened JFrames also show the icon.
    However if JDialogs are opended, in some cases the icon set on the main frame is shown and in other cases the coffee cup.
    What is JFrame.setIconImage() expected to do? Setting the icon for a single JFrame or the entire application?
    How can I set the icon for the entire application?
    How can I set the icon for JDialogs?
    Thank you

    In order for your dialogs to use the same icon as the frame, you must parent the dialogs to the frame which has the custom icon.
    See the following thread for more information: http://forum.java.sun.com/thread.jsp?forum=57&thread=362542
    cheers,
    Greg

  • How to set the number of seconds (or time) a photo is displayed on a slideshow (ATV2)

    Can I set the number of seconds a photo stays on the TV screen when I  do a slideshow from my ATV2?   Can't seem to find a setting on the Apple TV to do that.   For the slideshow on the ATV2 I am choosing an Event from my iPhoto library and then choosing "slideshow" after adjusting the ATV2 settings for music and theme.

    You can only set the time of slides with certain types of slideshows (i.e. classic and ken burns)

Maybe you are looking for