WRITE MACRO FOR WORD IN ORACLE FORMS 6I

Dear All
I want to know the coding to write a macro for word document to print , when i open the word document using ole2. I am able to open word, insert the header and footer but i want to print the document also. Since I dont want to write the macro in word file because i have lot of files , so whenever the user run the form i just want to take print . Is there any way.
V.S

V.S.,
I suggest you open a Word document and record a macro that prints a document. Then edit the macro and you will see all of the commands that were issued to print the document. Then try to emulate these commands in your OLE calls from Forms.
I tried searching the internet for a comprehensive list of OLE commands, but never found anything. Through trial and error, I discovered if I open the application and recorded a macro to perform that action I want (in this case - printing a Word document) - I could edit the macro and see the commands used by the application to perform the action. Then base your Form OLE code on the macro. ;-)
Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly.

Similar Messages

  • Possible to write macros for CP5.5?

    Has anybody found a way to write macros for CP 5.5?
    We would like to be able to, for example, write a macro to delete a specific style and replace it with another.
    It would save us a lot of repetitive work if we could do this.
    Thanks for any help...
    Marion

    Hi there
    Not heard of WinParrot before. Would be nice to see an actual link in mentions like that so one doesn't have to wander away googling.
    While I haven't heard any mentions of folks using this with Captivate, many folks in times past have sworn by Macro Express.
    http://www.macros.com/
    At least, for Windows machines. I'm not sure if they offer a version for Macs. I'm not creative and wealthy. I don't own a Mac.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • List Randomizer Macro for Word 2010

    Way back with Word '97 one of my students wrote a convenient macro for randomizing lists of words.
    Briefly, the list was highlighted and the Macro button (or keystrokes) pushed - and the list was nicely randomized.
    I do not have this Macro anymore and need a similar one for Office 2010 32 bit (MS Word only).
    Note: I am well aware of online randomizers as well as using Excel to randomize a list. However, I wish to eliminate time/energy wasted steps and randomize word lists within Word 2010 itself.
    Any suggestions?

    One approach is:
    Sub Demo()
    Dim Rng As Range, i As Long
    Dim StrIn As String, StrOut As String, StrTmp As String
    Randomize Timer
    Set Rng = Selection.Range
    StrIn = Rng.Text
    StrIn = Trim(StrIn) & " "
    While UBound(Split(StrIn, " ")) > 0
      i = UBound(Split(StrIn, " "))
      StrTmp = Split(StrIn, " ")(Rnd(i)) & " "
      StrOut = StrOut & StrTmp
      StrIn = Replace(StrIn, StrTmp, "")
    Wend
    StrOut = Trim(Trim(StrOut) & " " & StrIn)
    Rng.Text = StrOut
    Rng.Select
    End Sub
    The above assumes a list separated by spaces. For lists separated by paragraph breaks or tabs, insert:
    StrIn = Replace(StrIn, vbCr, " ")
    or:
    StrIn = Replace(StrIn, vbTab, " ")
    before:
    StrIn = Trim(StrIn) & " "
    and insert a corresponding:
    StrOut = Replace(StrOut, " ", vbCr)
    or:
    StrIn = Replace(StrOut, " ", vbTab)
    before:
    Rng.Text = StrOut
    Cheers
    Paul Edstein
    [MS MVP - Word]

  • Write number in words (using Oracle)

    Hello
    Can you please advise how to convert a number to word in Oracle?
    I am aware of using following but this has limitation of using number till 5373484
    select to_char(to_date('2013', 'j'), 'jsp') as "Date in Words" from dual
    Thanks in advance,
    Tinku

    Hi, Tinku,
    See this Tom Kyte page. It shows how to insert "billion", "trillion" etc. into the strings that 'Jsp' provides. Basically, you only have to spell the first thousand numbers, that is, up to 3 digits. The next 3 digits just repeat the pattern, with "thousand" appended to the end. The 3 digits after that just repeat the pattern again, with "million" concatenated, the 3 digits after that have "billion" (at least in the USA), and so on.
    The same page also shows spelling functions for French and Portuguese.

  • Book for self study oracle forms

    hi all, i want to study how to do the oracle forms and report programming, any book suggestion? thanks.

    Forms is also covered in
    Oracle 9i Web Development
    By Bradley d. Brown
    Oracle Press
    ISBN: 0-07-219388-3
    Forms (and reports) are described on page 773 - 834.
    Not much so don't buy this book only for information about Forms.
    The problem is that there are no specific books for Forms 9i yet. For example the book Oracle Developer Forms Techniques mentioned earlier describes till version 6i.
    Not that it can't be used, but some new techniques specific to 9i are not mentioned.

  • Executing a macro (for WORD)

    Hi everyone,
    I created a macro in Word.
    Now I am calling it successfuly from ABAP using i_oi_document_proxy->execute_macro.
    Is there a way to pass a parameter from ABAP to the macro ?
    Thanks in advance.

    HI
    GOOD
    GO THROUGH THIS CODE , I HOPE YOU WILL GET SOME HELP YOU SOLVE YOUR PROBLEM.
                          EXAMPLE                      *
    REPORT ZVALDATE . 
      Data: v_date(8).
      V_date = '20030102'.
    VAL_DATE <DATE> <FORMAT>  <-- Passing Parameters
      val_date v_date 'YYYYMMDD'.
      if sy-subrc = 0.
        write: 'Valid Date' .
      elseif sy-subrc = 1.
        write: 'Invalid Date' .
      elseif sy-subrc = 2.
        write: 'Invalid Date Format' .
      endif.
                      END OF REPORT                    *
    To use the macro "VAL_DATE" GLOBALLY, Insert the  *
    below 2 macros in table TRMAC using Txn SM30.     *
    Sytax :                                            *
    VAL_DATA <Date> <Date format>.                     *
    It return sy-subrc.                                *
          0 => Valid date - as per the specified format*
          1 => Invalid date                            *
          2 => Invalid date format                     *
    <Date format> :                                    *
    You can pass the following date formats            *
    DDMMYYYY  MMDDYYYY  YYYYMMDD  YYYYDDMM             *
                  Macro    VAL-DATE                    *
    This macro validate Date according to the specified*
    format.                                            *
               Created by Abhishek Kumar               *
               [email protected]                        * 
    define val-dat.
      clear: %_date1, %_date2.
      %_date1(4)   = &1. "Year
      %_date1+4(2) = &2. "Month
      %_date1+6(2) = &3. "Date
      %_date2 = %_date1 - 1.
      %_date2 = %_date2 + 1.
      if %_date1 <> %_date2.
        sy-subrc = 1.
      else.
        sy-subrc = 0.
      endif.
    end-of-definition.
                  Macro    VAL_DATE                    *
               Created by Abhishek Kumar               *
               [email protected]                        *
    define val_date.
      data %_date1 like sy-datum.
      data  %_date2 like sy-datum.
      data %_date3(8).
      case &2.
        when 'DDMMYYYY'.
          val-date &14(4) &12(2) &1+0(2).
        when 'MMDDYYYY'.
          val-date &14(4) &10(2) &1+2(2).
        when 'YYYYMMDD'.
          val-date &10(4) &14(2) &1+6(2).
        when 'MMYYYYDD'.
          val-date &12(4) &10(2) &1+6(2).
        when others.
          sy-subrc =  2.
      endcase.
    end-of-definition.
    THANKS
    MRUTYUN

  • Connecter for provisioning to Oracle Form based Applications

    Hi,
    I would like to provision users from OIM to Oracle Form based applications.May I know which connecter I have to use?. DB Application table connecter or DB User Management Connecter?.
    Also may I know in which table I need to refer to (If i am using Application Table connecter)?.Thanks.

    The database application table connector should work fine. Figure out which table contains the user information for the users and you should be fine.
    If Oracle Forms actually uses database users just use the database user connector.
    Best regards
    /Martin

  • I need a code for backup from oracle forms 10.1.2.3g

    Please if any body can help me that what code will I use to get a backup of my db from forms, I am using 10.1.2.3 version of forms with 10g db.
    Thank you.
    Hina

    Hello,
    Backing up a database is not the work of an Oracle Forms user. It has to be done by a Database administrator. There are several ways to backup a DB, cold or hot, with export/import, by copying the datafiles, ...
    None of this methods have any relation with Oracle Forms, so have to be launched as external programs.
    If the client has those utilities installed locally, you should use the Webutil Client_Host() built-in to start them.
    Francois

  • Best approach for post-update (Oracle Forms equivalent) operations?

    Hi
    Having scanned all the available literature / blogs / forum posts I can find, I'm not sure of the correct way to proceed here, can anybody advise?
    I am planning to build a custom OAF page to update rows in a seeded Apps table.
    After any update via my page, I want to insert a message into a custom audit table, to record the event for reporting purposes. In Forms I would have used a POST-UPDATE trigger to do that, but there doesn't seem to be a direct equivalent in OAF.
    Here are the approaches I have considered
    1. Db trigger, or related approach. I don't want to do this on a seeded table.
    2. Create a pl/sql EO on the seeded table, use the pl/sql code to store the audit rows on update (this seems easiest to me ...).
    3. Use CallableStatement to create the rows in AM and call from CO (or EO?).
    4. Create java EOs for both the seeded table and the audit table, and implement the audit table update by manipulating the audit table EO.
    From all I have read, I believe #4 is the correct approach as pl/sql EOs are not recommended (except to leverage existing APIs), but it's not clear to me how to go about coding it, could somebody help me get started please?

    Gyan Darpan wrote:
    Step 1- create a Custom method in AM.
    Step 2 - Create a Eo & EOVO for the Audit table.
    Step 3- Get all the value from the page ..which u want to save inside the audit table.
    Step 4 - Once u get the value..set the same to the EOVO using setAttribute();
    Step 5 - Call this method before calling commit.
    Thanks Gyan, that's very helpful. I have a table with multiple updates, and I wasn't confident about how to identify the
    updated records to process them one by one, so after some more searching/experimentation I end up with this approach :
    1. Created an EO + EOVO for the Audit table (not sure VO actually required in this approach).
    2. Exposed the doDML method in the Seeded EO by clicking Data Manipulation Methods on the EO's 'Java' page.
    3. In the doDML method, I added code like this, which is called on every update : ( RequestsEO is the EO of the table being updated, MessagesEO is the audit table also being inserted into. )
           // Get New Message ID and instantiate a MessagesEO row.
           Number Id=Rtr.getSequenceValue("XX_MESSAGES_SEQ");
           NameValuePairs nvp = new NameValuePairs(new String[]{"LineId"},new Object[]{Id.toString()});
           MessagesEOImpl Msg = (MessagesEOImpl)getOADBTransaction().createEntityInstance("oracle.apps.xx.testaudit.server.MessagesEO",nvp);
           // Set various required fields in MessagesEO.
           Msg.setLineId(Id);
           Msg.setLineType("A");
           Msg.setSourceName("AUDITSREQ");
           Msg.setSourceId("1");
           // Build Audit message from fields in updated record.
           Number RequestId=getRequestId();
           String sRequestId=RequestId.toString();
           String sAttribute5=getAttribute5();
           Msg.setTextline("Updated Request ID [" +sRequestId + "] to [" +sAttribute5 + "].");
           // Update Request
           super.doDML(operation, e);
             I'm pretty happy with the result, but am I doing anything I "shouldn't" here?
    In particular, should I try to use VO and/or calling a method in the AM rather than coding direct in the EO?
    Thanks again
    RMH

  • Call Oracle Help for Java in Oracle forms running in the web

    Hi, everyone,
    We are developing a web-enabled Oracle database application
    system. Oracle suggested us to use Oracle Help for Java(OHJ) to
    create an online help system for the web environment. We
    successfully created a OHJ program which can be independently.
    But we still have no idea how to call this OHJ program from the
    forms running in the web environment.
    Could anyone help us out?
    Thanks.
    null

    I would like to know if anyone has been able to do this too. Could someone respond if they have successfully gotten this to work?
    Thanks!!

  • Cursor for loop in  oracle forms 6i

    Hi all,
           I have written code in the find button to display deptno=10 employees ,in TOAD it worked fine, but why it is not worked in the form find button? Please suggest? I added below i am getting all records? , I want only related employees records..
    BEGIN
        FOR e_cursor  IN ( SELECT ename  FROM emp where deptno=10 ) LOOP
          dbms_output.put_line( e_cursor.ename );
        END LOOP;
        --EXECUTE_QUERY;
    END;
    Thank You

    Christian Erlinger wrote:
    dbms_output will do exactly nothing in forms, as forms won't get the output buffer like toad or sqlplus does. Besides that I am guessing you have a basetableblock basing on your emp table? The easiest way would be to add a where clause programmatically to your block using set_block_property. No cursor needed at all.
    cheers
    Message was edited by: Christian Erlinger
    Yes i have basetable block basing on emp table.
    Could you please give an example on this please?

  • Macros for Word

    Hi,
    I need to split the number of bits in Word. For example, 1000000 => 1 000 000, 00. I don't found standart feature. But i found this code:     
     Dim SelectionStart As Long
      Dim SelectionEnd As Long
      SelectionStart = Selection.Start
      SelectionEnd = Selection.End
      Selection.EndKey wdStory, wdMove
      With Selection.Find
        .Text = "[0-9]{4;}"
        .MatchWildcards = True
        .Forward = False
        While .Execute
          If Not .Parent.Previous Is Nothing Then
            If .Parent.Previous.Text <> "," Then
              .Parent.Text = FormatNumber(CDbl(.Parent.Text), 2, GroupDigits:=vbTrue)
              Selection.Collapse wdCollapseStart
            End If
          Else
            .Parent.Text = FormatNumber(CDbl(.Parent.Text), 2, GroupDigits:=vbTrue)
          End If
        Wend
          Selection.SetRange SelectionStart, SelectionEnd
    It's not bad. And I also want to add to this code at the bottom: "ActiveDocument.SaveAs" - no problem.
    Then, i enter my number, click on the button, which contain this code, number has transformed. SaveDialog has also opend, then click "save" and have  "Run-time error: 4198. Command error".Then click "Debug", file closed
    and appear on my Desktop. 
    Can you tell me,  what is cuase of this problem, how to hide this Error???
    Thank you for reply :)

    The following works fine for me:
    Sub Demo()
    Application.ScreenUpdating = False
    Dim StrPath As String
    StrPath = "C:\Users\" & Environ("Username") & "\Documents\"
    With ActiveDocument
      With .Range
        With .Find
          .ClearFormatting
          .Replacement.ClearFormatting
          .Text = "<[0-9]{4;}>"
          .Replacement.Text = ""
          .Forward = True
          .Wrap = wdFindStop
          .Format = False
          .MatchWildcards = True
          .Execute
        End With
        Do While .Find.Found
          .Text = Replace(Format(.Text, "#,##0"), ",", " ") & ",00"
          .Collapse wdCollapseEnd
          .Find.Execute
        Loop
      End With
      .SaveAs FileName:=StrPath & "MyFile.docx", FileFormat:=wdFormatXMLDocument
    End With
    Application.ScreenUpdating = True
    End Sub
    The new file's name is 'MyFile.docx'.
    Cheers
    Paul Edstein
    [MS MVP - Word]

  • Urgently: Open MS.Word on Oracle Form Server 6i

    Hi,
    I must open MS.Word on Form Server. How Can I do it?
    Someone have a some examples.
    Best Regards,
    Janyarak M.

    Not the most elegant solution, but you can use OLE2 on the application server.
    If MS Word is installed on the application server, you can create the Word file on the application server and show it on the client using web.show_document.
    The only other way is by using a java bean as already suggested.
    We implemented the first method and this is working fine if you want only one document at a time.
    We are now implementing the second method using a own written java bean and JACOB.

  • How can implement running total in oracle forms

    I want to implement a running total in oracle form
    like
    100 100
    300 400
    200 600
    500 1100
    200 1300
    100 1400
    PROCEDURE calculate_srno IS
    current_rownum     integer:=:System.Cursor_Record;
    starting_srno integer:=:rs_1;
    last_rownum integer;
    BEGIN
         last_record;
         last_rownum:=:system.cursor_record;
         go_record(1);
         FOR counter IN 1..last_rownum LOOP
              :sum_1:=:rs_1;
              :rs_1:=:sum_1+:rs_1;
         --     :offered_srno_to:=starting_srno;
              if last_rownum=:System.Cursor_Record then exit;
              end if;
         END LOOP;
    END;
    it is not working after want to insert between in the table

    Why write code for this? Oracle Forms 10g has Calculated/Summary fields that will do this for you without the need of writing any PL/SQL.
    Simply add a non-table item to the data block with the item you want to keep the running total for. Then change the following properties of the item:
    Data Type: Number
    Calculation Mode: Summary
    Summary Function: Sum
    Summarized Block: <Your Data Block>
    Summarized Item: <Your Block Item>
    Number of Items Displayed: 1 (if your item is in a Multi-Record (Tabular) layout else you don't need to change this property.
    You will also need to change the following property of the block: Query All Records: Yes
    If changing the Block's "Query All Records" property causes your form to be too slow because of the number of records in your block, then you could keep a running total manually by using a combination of the Post-Query and When-Validate-Item (WVI) triggers. If your block does not allow data entry, then you could do this with just the Post-Query trigger. For example:
    BEGIN
      /* This code sample assumes you have added a non-table item */
      /* to your block called SUMMARY.  */
      :YOUR_BLOCK.SUMMARY := :YOUR_BLOCK.SUMMARY + NVL(:RS_1,0);
    END;If your block allows data entry, then you would add the following to your existing WVI trigger.
    BEGIN
      /* Perform your data entry validation logic first... */
      IF ....
      ELSE
        ...Validation is successful...
        :YOUR_BLOCK.SUMMARY := :YOUR_BLOCK.SUMMARY + NVL(:RS_1,0);
      END IF;
    END;Hope this helps.
    Craig...

  • Replacement for Exit_Menu Built-in in Oracle Forms 10g

    Hi All,
    Is there any replacement available for Exit_Menu in oracle forms 10g?.
    Regards,
    Prasad.

    No. Menus built-in associated with full-screen display and character mode have been removed in 10g.

Maybe you are looking for

  • Error while activating a screen copied from another program ??

    Friends, i have a requirement wherin a screen should come as a popup when a button in the selection screen is clicked. The same screen which needs to be displayed, is also present in another program. So i copied the screen and the appropriate fields

  • How to insert the new field to standard scheduling agreement script form.

    Hi Gurus, how to insert the new fields to standad sheduling agreement script form. its a need for me, i want to display the AEDAT field in scheduling agreement form , The below one is my requirement, ex:-   Itu2019s requested the change of Scheduling

  • Report Painter/Report Writer - Urgent

    Hi, I am trying to created a account balance report for more than one company code in report painter, the format is Account      CoCode1  CoCode2   CoCode3   Total XXXXX       XXXXX    XXXXX     XXXXXX   XXX When i tried to run the report the descrip

  • "View in Broswer" is not working

    Hi All, we are using SharePoint 2013 Power Pivot Galleries. Everything is working fine. Expect one thing. When I change the view of from "Gallery" to "All Documents" and open the properties and select "view in browser" nothing happens - no error mess

  • Mixdown: is it always necessary?

    I don't know much about audio (as this question demonstrates). If I have a project where all the audio is on A1 and A2 only (stereo pair) (not on A3, A4 etc.) do I ever need to mixdown?