Using and Apex developed system and generating  word documents

Started a new development project. We looked at using Apex for the system but ran up against a road block because the customer needs to generate word documents that they can edit and print. Does anyone know if Apex can handle this? Any suggestions on were to look for more information.

Hi Dawn,
Yes you can certainly do that, take a look at this quick overview -
http://www.oracle.com/technology/products/database/application_express/html/configure_printing.html
It refers specifically to PDF printing, however with BI Publisher you can output in Word Document format too.
Hope this helps,
John.
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

Similar Messages

  • How to prevent public users from creating and saving Word Documents

    I have two public computers available for the public to view legal case documents.  The program used uses the Word shell to save, view and print documents within the program.  The clerk has stated that she does not want attorneys or others to
    be able to create and save word documents on these computers.  Is there a way to prevent a user on the public computers from opening word, creating a document and saving it?

    Instead of installing Word on the public computer (or at least instead of making it available on the public account), you could install the free Word Viewer:
    https://www.microsoft.com/en-us/download/details.aspx?id=4 and make that available for the public account. Alternatively, if you want to ensure the document retains its originally
    formatting regardless of what printer may or may not be attached to the public computer, you could keep only PDF copies of the file where the public can access them and install the free Adobe Acrobat Reader for viewing:
    https://get.adobe.com/reader/.
    Cheers
    Paul Edstein
    [MS MVP - Word]

  • Search text in PDF and MS Word document

    Can any body tell me how search text in PDF and MS Word document through Java code, any body has code or any suggestion to give
    Thank You
    Adnan

    Can any body tell me how search text in PDF
    and MS Word document through Java code, any
    body has code or any suggestion to giveYes.
    First, you need to work out how to read each document type from Java.
    E.g, for MS Word you could use Apache Jakarta POI - HWPF: http://jakarta.apache.org/poi/hwpf/index.html
    Then, you use Apache Lucene to index and search.
    See http://lucene.apache.org/java/docs/index.html
    ~D

  • To upload pdf and ms word document in VA01 header menu -TEXT tab

    I want to upload local file (PDF and Word) in R/3-VA01-Text Header..
    Can any one tell me the solution for that.

    Can any body tell me how search text in PDF
    and MS Word document through Java code, any
    body has code or any suggestion to giveYes.
    First, you need to work out how to read each document type from Java.
    E.g, for MS Word you could use Apache Jakarta POI - HWPF: http://jakarta.apache.org/poi/hwpf/index.html
    Then, you use Apache Lucene to index and search.
    See http://lucene.apache.org/java/docs/index.html
    ~D

  • Read,write and create word document with list data

    Hi,
    My requirement is that I have a custom list called List1 and which has a 4 (suppose XName, location, phone, email)columns and also have a Template document(.dot). If I click on save button , new document has to create from the Template document(.dot) and
    should modify the content depends on list columns.
    For that I need to read the document , find out the text where XName , location,,phone, email and replace with the list item data(user entered data). 
    Can anybody please refer links for read,write and create word document?
    Thanks in advance.

    Yes, you can using Office Open XML. I found it to be a lot more cumbersome and in the end not a money saving approach:
    https://msdn.microsoft.com/en-us/library/office/bb448854.aspx?f=255&MSPPError=-2147217396
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • Early watch alert - problem with generating word document

    Hello experts,
    since last week I am not able to generate word documents of early watch reports. I have access to 4 different solution manager installations (of customers) where the generation was working without problems but stops since last week.
    SAP gui starts word and the standard word sheet is loaded (SAP early watch start page) but without putting data into the sheet. At the same time I get an error message in the sap gui saying:
    Error during download; read details in long text
    Long text:
    Message no. DSVAS824
    Diagnosis
    The application was unable to write a file to a local directory.
    Procedure
    Often the maximum length of 128 characters for the entire file name, which is defined internally, is exceeded. To avoid this problem, you can change the setting.
    To do this, open Microsoft® Word.
    For English interfaces, choose Tools->Options->File Locations->User templates.
    For German interfaces, choose Extras->Optionen->Speicherort für Dateien->Benutzervorlagen.
    Recommendation: Use directory names with a maximum of 60 characters (For example  C:Program FilesMicrosoft OfficeTemplates)
    I have already maintained the path in word options (we use Word 2007). My colleagues have the same problems.
    Any ideas or hints? Thank you in advance.
    BR, Basti

    Hi all,
    SAP is aware of this problem and is working on a fix.
    For a ***temporary workaround**
    run se38
    RAGS_DSWP_SERV_CONTENT_RESET
    (De-Activate content until  26.05.2011 07:28:06
    Execute
    This will allow you to open the report on a temporary basis.

  • How to generate Word document from JSP ?

    Hi,
    I want to generate Word documnet from JSP. I am using Neva objects to generate Word document. Now my problem is Word doc generation code works alright as a Java application but when I place that piece of code in a JSP bean it throws an exception. The reason seems to be unavailibility of DLLs and other files of Neva in Tomcat environment. I do not want to use other complex packages like JIntegra, I would prefer any freeware solution. There is not much info. about Word document generation on POI project in Jakarta site.
    Could anyone suggest way out ? Any Java examples doing the same would be of great help.
    Thanks,
    Akash

    Hi Saurabh,
    Thanks for the reply.
    I have tried that too. Problem with that solution is that if you have used CSS in your JSP code MS word does not understand it and generates word doc which is not the same as HTML which JSP otherwise would have generated.
    Akash

  • Regarding "Generate Word document"

    Hi,
    I have one layout of xml publisher. In the layout I have made the page setup as
    Margins:
    Top - 0.3 Bottom - 0.3
    Left - 0.5 Right - 0.5
    and in Layout tab I have
    Header - 0.3 Footer - 0.3
    I have attached this layout in the Templates tab of XML Publisher responsibility.
    But when I am trying to Generate Word Document of my report, The layout and margins gets distorted.
    The Margins change to
    Top - 0.42 Bottom - 0.4
    Left - 0.46 Right - 0.46
    and in Layout tab I have
    Header - 0.5 Footer - 0.5
    Please help me out how can I control the header and footer of my report. Your ideas are welcome at [email protected]
    Thanks.
    Edited by: user5427917 on Nov 7, 2008 12:27 PM

    How are you generating the Word documents, manually? I haven't used it, but it looks like docx4j might be good library for building the documents. General documentation can be found [here|http://dev.plutext.org/trac/docx4j/wiki], description of [Java API|http://dev.plutext.org/docx4j/javadoc-2.2.2/] and here's the [download|http://dev.plutext.org/docx4j/].
    Cheers, harald

  • Insert and activate a phone number in a generated word document

    Hey guys,
    I would like to add a phone number to a word document that I generate using the mso api.
    In word, when one writes (Tel:00493298402938) and new line, the phone number is activated automatically.
    While trying to record the corresponding macro and check the VBA code, it doesn't show the same behavior and the phone number is interpreted as a normal text.
    Any helpful source code in VBA, C# or C++ is welcome.
    Thanks!

    Hi Cindy,
    It worked. I added a lync addin in word. and used:
        HyperlinkPtr Add (
            IDispatch * Anchor,
            VARIANT * Address = &vtMissing,
            VARIANT * SubAddress = &vtMissing,
            VARIANT * ScreenTip = &vtMissing,
            VARIANT * TextToDisplay = &vtMissing,
            VARIANT * Target = &vtMissing );
    with the second parameter "tel:002123049034" instead of just the phone number.

  • Infopath Multi Textbox and OpenXML to generate word document

     Hi,
    I'm reading multiple InfoPath Textbox (set to display multiple lines) using OpenXML and generating a word document based on a template collecting data from InfoPath. I'm using following code,  the code gives error in
    AddMultiLineText at Paragraph p = sdt.GetFirstChild<SdtContentBlock>().GetFirstChild<Paragraph>(); 
    The code actually works when I use only one Multi Textbox but fails if its more than one. I'm quite new to Infopath and OpenXML, I would appreciate some help ASAP as its holding me in my project:
    Event Receiver
      public override void ItemAdded(SPItemEventProperties properties)
               try
                   this.EventFiringEnabled = false;
                   string siteUrl = properties.WebUrl;
                   SPListItem item = properties.ListItem;
                   SPWeb web = properties.Web;
                   SPList lib = web.Lists["DocLib"];
                   SPFile file = lib.RootFolder.Files["template.docx"];
                   string generatedDoc = "";
                   if (file != null)
                       byte[] templateBytes = file.OpenBinary();
                       using (MemoryStream ms = new MemoryStream())
                           ms.Write(templateBytes, 0, (int)templateBytes.Length);
                           byte[] convertedDocBytes = ConvertInfoPathToWord(ms, item.File);
                           generatedDoc = item["LinkFilename"].ToString().Replace("xml", "docx");
                           SPFile newFile =
                             lib.RootFolder.Files.Add(generatedDoc, convertedDocBytes, true);
                           ms.Close();
     private byte[] ConvertInfoPathToWord(MemoryStream ms, SPFile file)
               byte[] bytes = file.OpenBinary();
               using (MemoryStream msInternal = new MemoryStream(bytes))
                   XmlDocument doc = new XmlDocument();
                   doc.Load(msInternal);
                   XPathNavigator root = doc.CreateNavigator();
                   root.MoveToFollowing(XPathNodeType.Element);
                   string ns = root.GetNamespace("my");
                   XmlNamespaceManager nsMgr = new XmlNamespaceManager(new NameTable());
                   nsMgr.AddNamespace("my", ns);
                    string multiLineText1 = root.SelectSingleNode(
                     "/my:myFields/my:field1", nsMgr).Value;
                   string multiLineText2 = root.SelectSingleNode(
                     "/my:myFields/my:field2", nsMgr).Value;
                    using (WordprocessingDocument myDoc =
                     WordprocessingDocument.Open(ms, true))
                       MainDocumentPart mainPart = myDoc.MainDocumentPart;
                       List<OpenXmlElement> sdtList = InfoPathToWord.GetContentControl(
                         mainPart.Document, "multilinetext1");
                       InfoPathToWord.AddMultiLineText(multiLineText1, ref sdtList);
                       List<OpenXmlElement> sdtList = InfoPathToWord.GetContentControl(
                         mainPart.Document, "multilinetext2");
                       InfoPathToWord.AddMultiLineText(multiLineText2, ref sdtList);
                        myDoc.Close();
                   msInternal.Close();
               return ms.ToArray();
            public static List<OpenXmlElement> GetContentControl(
              Document doc, string name)
                List<OpenXmlElement> list = new List<OpenXmlElement>();
                List<SdtBlock> sdtList = doc.Descendants<SdtBlock>()
                  .Where(s => name.Contains(s.SdtProperties.GetFirstChild<SdtAlias>()
                  .Val.Value)).ToList();
                if (sdtList.Count == 0)
                    List<SdtRun> sdtRunList = doc.Descendants<SdtRun>()
                      .Where(s => name.Contains(s.SdtProperties.GetFirstChild<SdtAlias>()
                      .Val.Value)).ToList();
                    foreach (SdtRun sdt in sdtRunList)
                        list.Add(sdt);
                else
                    foreach (SdtBlock sdt in sdtList)
                        list.Add(sdt);
                return list;
            public static void AddMultiLineText(
              string multiLineText, ref List<OpenXmlElement> sdtList)
                string[] lines = multiLineText.Split(new char[] { '\n' });
                if (sdtList.Count != 0)
                    foreach (OpenXmlElement sdt in sdtList)
                        for (int i = 0; i < lines.Length; i++)
    Paragraph p =
                              sdt.GetFirstChild<SdtContentBlock>().GetFirstChild<Paragraph>(); //this ERRORS
                            if (i == 0)
                                InfoPathToWord.WriteText(lines[i], ref p);
                            else
                                Paragraph pNext = sdt.AppendChild((Paragraph)p.Clone());
                                InfoPathToWord.WriteText(lines[i], ref pNext);

    Additional Info: multiLineText1 and multiLineText2 are "Plain Text Content Control" in the word template used to create the word document.

  • How to bee able to use the anchor functionality as is used in APEX develop

    Hi
    First of all APEX is great !
    I have been using APEX to do some small applications in Norway. Now i am in a position to make a sales presentation for Norwegian Civil Aviation authority department. I hope we winn the contract and then we are going to use APEX for building the system.
    I need to bee able to navigate between many regions on an effective way. We would have the pages with 3-8 regions on each page and it would bee very suitable do have the functionality which is used in APEX Application builder where it is possible to show all regions on the page and then bee able to scroll through all regions on the page.
    But also bee able to user #ANCHOR_NAME at the end of the URL and then just switch to one of the regions (show just one region on the page).
    I have made a test page with use of #ANCHOR_NAME and this is ok, but i don't know how to just hide all other regions when you navigate to the anchor name. In application builder it is very nice when you navigate between regions and when you hit the "Show All" link, all regions is displayed on the same page.
    I also need to have each region the same size in width as in Application Builder, and the theme used in Application builder would also bee nice to used (in another color) is it possible to have a copy of the theme and make some adjustments to it ?.
    I would bee very greatfull for any feed back about this subject. I am going to make a demonstration 19 Descember.
    jon.

    The Builder links you mention at the top of the Component Definition pages use markup like
    < a href="#N" onclick="qF(this,'#N');return false;" ... >Name< /a >That "qF" function is a slick piece of Javascript. You can review it at http://htmldb.oracle.com/i/javascript/htmldb_html_elements.js. The DOM nodes that the function uses are specific to the Builder page template, but the code is fairly generic enough that you can adapt it to meet your needs. [Not sure what your comfort and experience level with Javascript is]
    That function also saves the selected region/section in a client-side cookie so that it persists the next time you visit the page.
    Hope this helps.
    Carl: The following line in the "uR" function seems mighty strange!
    if(gThis == $x('ALL')){gThis = $x('ALL');}

  • Need an app to edit and sign word documents (sign with stylus)! Notability let's me sign but doesn't pull up letter head, quickofficepro let's me edit but not sign. Looking for an app that does both

    I am looking for an app where I can edit word documents as well as sign them.  I am a physical therapist whose looking to cut down on paper work.  Someone types my evaluations and then we print them out for me to edit by hand and then they go back and make the corrections on the computer then w print them and sign them to send off.  Recently I have begun using apps where I can pull up the document and edit it thru quickofficepro or through cloudon, but I cannot sign them using a stylus pen.  I also have notability which I can use to sign the documents, but it doesn't save the document as a doc, it's either a PDF or rtf. Also, in notability, it doesn't pull up the letter head for our company which is a template with our logo on it.  So I need an app where I can both edit and sign my documents by hand using a stylus.  If someone could provide me with any relevant information I would greatly appreciate it.  Thank you for your time.

    Hi,
    Pages for Mac OS X, the topic discussed in this community won't do it.
    I think you'll have a better chance for a useful answer in either the Using iPad or the iPad in the Enterprise community.
    Regards,
    Barry

  • Upload and display Word Document in WD application

    Hello,
    I have a WD ABAP appl. where the user wants to upload an Word / Excel file (from its own local drive).
    The document shall be saved in SAP and it shall also be possible to display the document later in the WD application.
    I implemented the UI element upload in the view, to determine the path of the document.
    For the display implemented the UI element Office control.
    1. When i browse the document, the properties data, filename and mime type are filled into the bound context elements of the upload UI.
    2. The property datasource of the UI office control I bound to the same context element, that is also bound to the property data of the upload UI.
    The office control opens a word document, but the document is empty.
    Is it possible that the document is not uploaded correct?
    In another application I did an upload for a PDF doc.. There I implemented the following coding as action of the button 'Upload'.
    data lo_nd_pdf type ref to if_wd_context_node.
    data lo_el_pdf type ref to if_wd_context_element.
    data ls_pdf type wd_this->element_pdf.
    data lv_pdf like ls_pdf-pdf.
    navigate from <CONTEXT> to <PDF> via lead selection
    lo_nd_pdf = wd_context->get_child_node( name = wd_this->wdctx_pdf ).
    get element via lead selection
    lo_el_pdf = lo_nd_pdf->get_element( ).
    get single attribute
    lo_el_pdf->get_attribute(
    exporting
    name = `PDF`
    importing
    value = lv_pdf ).
    Get a reference to the from processing class.
    data: l_fp type ref to if_fp.
    l_fp = cl_fp=>get_reference( ).
    Get a reference to the PDF Object class.
    data: l_pdfobj type ref to if_fp_pdf_object.
    l_pdfobj = l_fp->create_pdf_object( ).
    set the pdf in the PDF Object
    l_pdfobj->set_document( pdfdata = lv_pdf ).
    set the PDF Object to extract data the Form data.
    l_pdfobj->set_extractdata( ).
    execute call to ADS
    l_pdfobj->execute( ).
    get the PDF Form data
    data: pdf_form_data type xstring.
    l_pdfobj->get_data(
    importing
    formdata = pdf_form_data ).
    convert the xstring from data to string so it can be processed using the iXML classes
    data: converter type ref to cl_abap_conv_in_ce,
    formxml type string.
    converter = cl_abap_conv_in_ce=>create( input = pdf_form_data ).
    converter->read(
    importing
    data = formxml ).
    pull in the iXML type group.
    type-pools: ixml.
    get a reference to iXML object
    data:l_ixml type ref to if_ixml.
    l_ixml = cl_ixml=>create( ).
    get iStream object from StreamFactory
    data: streamfactory type ref to if_ixml_stream_factory,
    istream type ref to if_ixml_istream.
    streamfactory = l_ixml->create_stream_factory( ).
    istream = streamfactory->create_istream_string( formxml ).
    create an XML document class that will be used to process the XML
    data: document type ref to if_ixml_document.
    document = l_ixml->create_document( ).
    create the parser class
    data: parser type ref to if_ixml_parser.
    parser = l_ixml->create_parser( stream_factory = streamfactory
    istream = istream
    document = document ).
    parse the XML
    parser->parse( ).
    define XML Node type object
    data: node type ref to if_ixml_node,
    attributes type ref to if_ixml_named_node_map.
    get the psi sales data Node and value.
    data ls_psi_sales type wd_this->element_psi_sales.
    data: lt_dfies type table of dfies,
    ls_defies type dfies.
    call function 'DDIF_NAMETAB_GET'
    exporting
    tabname = 'ZCM_PSI_SALES'
    ALL_TYPES = ' '
    LFIELDNAME = ' '
    GROUP_NAMES = ' '
    UCLEN =
    IMPORTING
    X030L_WA =
    DTELINFO_WA =
    TTYPINFO_WA =
    DDOBJTYPE =
    DFIES_WA =
    LINES_DESCR =
    tables
    X031L_TAB =
    dfies_tab = lt_dfies
    exceptions
    not_found = 1
    others = 2
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    data: lv_fieldname type string.
    field-symbols <fs_field> type any.
    loop at lt_dfies into ls_defies.
    lv_fieldname = ls_defies-fieldname.
    node = document->find_from_name( name = lv_fieldname ).
    assign component lv_fieldname
    of structure ls_psi_sales
    to <fs_field>.
    if <fs_field> is assigned.
    <fs_field> = node->get_value( ).
    endif.
    endloop.
    WRITE DATA INTO CONTEXT
    data lo_nd_psi_sales type ref to if_wd_context_node.
    data lo_el_psi_sales type ref to if_wd_context_element.
    navigate from <CONTEXT> to <PSI_SALES> via lead selection
    lo_nd_psi_sales = wd_context->get_child_node( name = wd_this->wdctx_psi_sales ).
    get element via lead selection
    lo_el_psi_sales = lo_nd_psi_sales->get_element( ).
    set all declared attributes
    lo_el_psi_sales->set_static_attributes(
    exporting
    static_attributes = ls_psi_sales ).
    Do I need such a code also to upload a word doc?
    Which interface / class exists for word documents? (for PDF upload there is the interface IF_FP)
    How can I save a document in SAP? (as MIME Object?  with which method?)
    I hope someone can help me!?
    BR

    You can use the fileupload and filedownload uielements.
    Check these links:
    [File Upload|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/b3/be7941601b1d09e10000000a155106/content.htm]
    [File Download|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/09/a5884121a41c09e10000000a155106/content.htm]
    When you upload a file and save in SAP, are you saving it as xstring.
    If yes follow these steps for filedownload.
    Follow these steps for file download:
    1 Create FileDownload uielement in your View
    2.Create an Attribute of type xstring.
    3.Bind this attribute to the data property of your Filedownload uielement.
    4. during fileuplaod as you are saving the document in xstring format, fetch the same from your database table and pass the value to filedownload i.e set the attribute bound to data property of filedownload uielement with the xstring content.

  • Store and display word document in database through forms

    how can i store a word document in database through forms 6i or 10g, and display it through forms from database.
    i know how to store a binary file in database through DBMS_LOB package, but i want to do it throug forms. is it possible?
    regards

    Hi Alex
    "Create a datablock and specify the item datatype as blob"
    BUT: How to bring the document to the blob?
    Hi user 611..
    Warning: It is easy if you use an OLE-Object - but OLE is a special format. The result will not be the same as with dbms_LOB.
    We have a application with documents stored via OLE - terrible!
    OLE is no longer supported by forms 10. But webutil would help.
    I asked a similar question and got a good answer:
    OLE-Container and migration to the web
    Wolfram

  • Weblinks in my Mail client and in Word documents stopped working

    Hello,
    I am struggling to fix this issue. Out of the blue, hyperlinks in emails, word documents, skype, etc stopped working. Clicking on them usually takes me to Firefox, my default browser, but nothing happens usually. At other times a page opens which is NOT the page that should have opened but another one, that I used in the past. I can copy and paste the links into the browser and open them without problems. Also, the touchpad works perfectly in every other sense. Clicking on things within Firefox itself works without problems .. pages open fine.
    I really have no idea what's going on as the problem started out of the blue ...
    Any ideas?
    Pavla

    Pages is much more for desktop publishing than word processing. I produce flyers and advertisers for my business and have found Pages much easier and more versatile than Illustrator or Word. Never have tried Pagemaker, which I understand to be one of the premier DTP applications from days past.
    Oh... I forgot to say, you can actually have multiple Inspectors for the same document too.
    When ever I am working with multiple Pages documents, being that I am using a MacBook, I make extensive use of Spaces, with different documents occupying different Spaces. Give it a try sometime. You might like it.
    Good luck and have fun discovering what Pages can & can NOT do for you.
    And come back soon.
    Adam

Maybe you are looking for