Jsp contents to MS Word

How to post contents displayed on a JSP (Say data in table form) to Microsoft Word Document, on click of a button on JSP.

You can set it up to create RTF documents, although it would be a pretty epic job. Word can read html nowadays, so it may not be totally necessary?

Similar Messages

  • Using PowerShell to Copy the content of a Word Document and Paste that content into a New Message in Outlook

    So, I'm a little new to PowerShell and I came across a PowerShell which allow me to copy the content od a spreadsheet, into the new message in Outlook 2007.  I have search and search on a way to do the same with a Word Document.  I would like to
    create a PowerShell Script that copies the content of a Word Document and paste that content in an email message.
    I am basing my script on this
    #Create and get my Word Obj
    $w1 = New-Object  -comobject Word.Application
    $w1.Visible = $True
    $UserWord = $w1.Workbooks.Open("C:\Users\hhhh\Documents\Powershell\test.docx")
    #create outlook Object
    $Outlook = New-Object  -comObject  Outlook.Application 
    $Mail = $Outlook.CreateItem(0)
    $Mail.SentOnBehalfOfName = "[email protected]"
    $Mail.Recipients.Add("[email protected]")
    #Add the text part I want to display first
    $Mail.Subject = "Test email"
    $Mail.Body = "My Comment on the Excel Spreadsheet"
    #Then Copy the Word using parameters to format it
    $Mail.Getinspector.WordEditor.Range().PasteExcelTable($true,$false,$false)
    #Then it becomes possible to insert text before
    $wdDoc = $Mail.Getinspector.WordEditor
    $wdRange = $wdDoc.Range()
    $Mail.Display()
    Any Help would be great!

    My requirements are the Word documents are a template of sorts.  The document will be changes prior to its email with some changes.  The other twist is that the customer might more that one recipients, and each recipient will have to have a separate
    email, with the same content of the word document. 
    For example: Say I'm doing maintenance. The Word doc might descript that maintenance, in a set format. Once save the script is run to generate 3 to 10 email with separate recipients with the body of the email containing what was in the Word document.

  • How to read the content of ms-word file use pure java???

    how to read the content of ms-word file use pure java???

    hi,
    check this: http://jakarta.apache.org/poi/

  • Converting Robohelp Content to a Word and PDF document.

    I am in the process of creating an online help manual with several jpg images.  The jpg images are clear in Robohelp, but when I convert the content to a Word or PDF, the content and images are fuzzy and blurry, especially the PDF. Any thoughts or suggestions as to why this is occurring?  I did not have this issue with my last project, the clarity, content, and formatting was very clear including the jpg images.
    Thanks,
    Wendy

    Hi Wendy,
                there is almost no conversion of images on generating any output from RoboHelp, can you please also specify how those topics with images were created.
    if possible please share a sample image and correponding code snippet from RoboHelp.
    you can try removing any resizing done to those images and then generate the output.
    Ashish

  • How to put jsp content in to string butter?

    Hello Friends,
    I'm new to J2EE. please tell me how can I put jsp content into string buffer. following is a part of code I wrote. I'm also reading data from database on some part of code.
    <html>
         <head>
              <title>JSP for AdminForm form</title>
         </head>
         <body style="font-family:verdana;font-size:10pt;"><=<br>
         <%@ include file="header.html" %>
              <html:form action="/admin">
                   <table border="1" width="700" height="500">
                   <tr>
                   <td border="1" width="100" height="5"> Check <br></td>
                   <td border="1" width="100" height="5"> SNo. <br></td>
    </tr>
    <tr>
                   <td border="1" width="150" height="5"> userId <br></td>
                   <td border="1" width="150" height="5"> Role <br></td>
                   <td border="1" width="150" height="5"> Dept. <br></td>
                   <td border="1" width="150" height="5"> Edit <br></td>
                   </tr>
    </table>
    </body>
    </html>
    please help me out.
    Thanks.

    You have to generate a replacement for the default ServletOuputStream so that every time the data is sent to the browser (via the output stream) it is also sent to a tool that can generate a String or StringBuffer (a StringWriter does this nicely). One way to do this is to generate a ServletOutputStream implementation that wraps a ServletOutputStream and StringWriter. You would implement each method in ServletOutputStream and pass the parameters to both wrapped streams, i.e.:
    public class ServletOutputStreamAndStringWriter extends ServletOutputStream {
      private ServletOutputStream sos;
      private StringWriter sw;
      pubic ServletOutputStreamAndStringWriter (ServletOutputStream sos, StringWriter sw) {
        this.sos = sos;
        this.sw = sw;
      public void print(String s) {
        sos.print(s);
        sw.write(s);
      public void println(String s) {
        sos.println(s);
        sw.swrite(s+System.getProperty("line.separator"));
      //etc... for all methods including flushes and closes...
    }Next you have to insert the ServletOutputStream implementation above into the application in a manner that doesn't require a re-write of the rest of your code. The best way to do this is to generate a ServletResponseWrapper implementation that returns your new implementation of the ServletOutputStream in the getOutputStream() method:
    public class SplitOutputServletResponse extends ServletResponseWrapper {
      private ServletOutputStreamAndStringWriter sosasw;
      public SplitOutputServletResponse(ServletResponse sr, ServletOutputStreamAndStringWriter sosasw) {
        super(sr);
        this.sosasw = sosasw;
      public ServletOutputStream getOutputStream() { return sosasw; }
    }Now all you have to do is replace the response you use in your application with this wrapper. The best way to do it is through a Filter:
    public class SplitOutputFilter implements javax.servlet.Filter {
      private FilterConfig fc;
      public void init(FilterConfig fc) { this.fc = fc; }
      public void destroy() { }
      /* This is where the filtering work gets done.  You get a request and a response, you pass the request,
          replace the response, and let the rest of the filter chain do its work (the JSP page gets generated and the
          response to the client is generated).  Then after the rest of the filter chain you get the text out of the
          StringWriter you generated for the ServletOutputStream
      public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) {
        // After the JSP does its work, the StringBuffer will be generated from this StringWriter
        StringWriter stringBufferFromHere = new StringWriter();
        // This is the tool used to deliver the JSP output to the above StringWriter
        ServletOutputStreamAndStringWriter output = new ServletOutputStreamAndStringWriter (response.getOutputStream(), stringBufferFromHere);
        // And this is the tool used to deliver the above output stream to the JSP pages
        SplitOutputServletResponse sosr = new SplitOutputServletResponse(response, output);
        // Now we replace the incoming ServletResponse with the wrapper generate above for the rest of the FilterChain
        // which includes the actual execution of the JSP
        chain.doFilter(request, sosr);
        // By the time we get to this point, the JSP has already generated the page.  We need to extract the text as
        // a StringBuffer, which we should have access to via the StringWriter
        StringBuffer jspOutput = stringBufferFromHere.getBuffer();
        // Then do whatever you need to do with the buffer...  Note that the FilterContext provides a reference to the
        // ServletContext which could help you store the buffer, put it in DB, or whatever you wanted to do with it...
    }Filters start at the beginning of a request cycle, can be mapped to particular URLs or groups of URLs. To see how to use them see: http://java.sun.com/products/servlet/Filters.html which also has some similar examples.

  • Running JSP content that is NOT in a jsp file

    What I would like to do is this:
              I have an application deployed as an ear file. I would like to add JSP
              files while the server is running (much like you can do in exploded
              format).
              Furthermore, I would like to have the JSP content stored in an
              external medium, such as a database. As far as I can tell, I cant work
              out how to make JSPs run from anything other then a file relative to
              the context root (and fixed in the case of an ear).
              There must be a weblogic JSP engine class that I can extend/decorate
              to read the JSP from another location.
              Any ideas?
              

    "MikeNeale" == MikeNeale <[email protected]> writes:
                        MikeNeale> What I would like to do is this:
              MikeNeale> I have an application deployed as an ear file. I would like to add JSP
              MikeNeale> files while the server is running (much like you can do in exploded
              MikeNeale> format).
              MikeNeale> Furthermore, I would like to have the JSP content stored in an
              MikeNeale> external medium, such as a database. As far as I can tell, I cant work
              MikeNeale> out how to make JSPs run from anything other then a file relative to
              MikeNeale> the context root (and fixed in the case of an ear).
              MikeNeale> There must be a weblogic JSP engine class that I can extend/decorate
              MikeNeale> to read the JSP from another location.
              You're probably better off looking in a different direction, by having your
              application use dynamically generated XML along with transformers.
              ===================================================================
              David M. Karr ; Java/J2EE/XML/Unix/C++
              [email protected] ; SCJP; SCWCD
              

  • Export jsp content to Excel -- how to keep leading zero?

    Hi:
    I am trying to export a JSP content to Excel by using
    response.setContentType( "application/vnd.ms-excel" );
    response.setHeader( "Content-disposition", "attachment; filename=pc.xls" );
    it was working great except my jsp has a field whose value consist of leading zero. i.e. 000XXX. Excel strips the leading zero, but I would like to keep them. Please advise.

    hi Chang,
    Can you please check my thread http://forum.java.sun.com/thread.jspa?threadID=737238&tstart=0
    I think you might know the answer since it is similar functionality but for text files.
    Thanks !

  • Read content in Microsoft Word file.

    My new project is to read content in Microsoft Word. But,
    blah blah blah code are appeared when I read microsoft word file
    with cffile tag, and display included content in textarea. Here is
    my coding. Anything wrong in my coding and how can I read ms.word
    file and display included content in this file??
    all answers will be appreciated.

    I have figured out how to use Object in Word to embed the SWF file and use the Control Box to activate it, however, like you when I convert to Acrobat PDF from the Word Add-in it does not embed the SWF in a playable format, although the object is there.  I can't seem to get any relevant properties using the Touch Up Object tool either.  I hope someone else has a clue.  Otherwise I recommend creating your word document with "empty" text boxes that the text will wrap around and then converting to PDF and once in Acrobat embed a Flash object using the Multimedia button.

  • How to save automatically the content of the word document on Intranet site

    Hi,
    There is a function asked by application user:
    1. Open Word document from the corporate Intranet site
    2. Update the content of the Word document
    3. Automatically update the Word document on Intranet site with the new content or automatically upload Word document with the new content.
    Thank you for your help or any suggestion.
    Best regards,
    Mladen

    After generating, use F2 to rename the output.
    Sorry but I don't think you can avoid it.
    Please follow this link and submit a feature request.
    http://www.Adobe.com/cfusion/mmform/index.cfm?name=wishform&product=38
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Modify jsp content (before the jsp processing!)

    Hi!
    I would like to modify the jsp content before jsp processing (like at tags, but there the outgoing HTML content is modified not the clear jsp)
    So this is what is want: for example i would like to introduce a tag and this tag will modify the jsp content (it will put some jsp lines) and after the whole jsp will be processed and we get a HTML what is displayed in the client.
    for example this is the JSP:
    <html>
        <body>
            <mytags:grid data="apple,lemon" />
        </body>
    </html>it will change to this (for example):
    <html>
        <body>
            <% String data = "apple,lemon"; %>
            <jsf:grid data="<%=data%>" />
        </body>
    </html>the container will process this and generates a HTML page.
    So is there any chance to do this?
    Thanks!
    ric flair

    Here is an example:
    If you put the following in the JSP page, the JSP page will outtput one of the two html tags specified.
    Note this example uses java scriptlets (the html is sent to the client, not the scriplets).A better approach is to use JSTL.
    A book on JSP will better explain the use of JSP.
    <% if ( item.length()>0 ){%>
    <input type="text" name="firstName">
    <%}else{%>
    <input type="text" name="firstName">
    <%}%>

  • Using JSP/Servlet to write Word Document to BLOB

    Hi
    I need some help pls
    When I use a normal class with a main method, it loads the word document into a blob and I can read this 100%.Stunning.
    With a JSP/Servlet I cannot get the document out again. The "format" seems to be lost.
    Any ideas,help greatly appreciated:
    Here is the Main class that works:
    package mypackage1;
    import java.io.OutputStream;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.PrintWriter;
    import java.io.IOException;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileReader;
    import java.io.FileNotFoundException;
    import java.io.Writer;
    import java.sql.Connection;
    import oracle.jdbc.*;
    import oracle.jdbc.OracleResultSet;
    import oracle.sql.BLOB;
    import org.apache.log4j.Logger;
    import Util_Connect.DataBase;
    public class TestLOB
    //static final Logger logger = Logger.getLogger("test");
    public TestLOB()
    public static void main(String args[])
    TestLOB testLOB = new TestLOB();
    testLOB.TestLOBInsert("c:\\my_data\\callcenterpilot.doc");
    public void TestLOBInsert(String fileName)
    Connection conn = getConnection("wizard");
    BLOB blob = null;
    try
    conn.setAutoCommit(false);
    String cmd = "SELECT * FROM so_cs.testlob WHERE docno = 1 FOR UPDATE";
    PreparedStatement pstmt = conn.prepareStatement(cmd);
    ResultSet rset = pstmt.executeQuery(cmd);
    rset.next();
    blob = ((OracleResultSet)rset).getBLOB(2);
    File binaryFile = new File(fileName);
    System.out.println("Document length = " + binaryFile.length());
    FileInputStream instream = new FileInputStream(binaryFile);
    OutputStream outstream = blob.getBinaryOutputStream();
    int size = blob.getBufferSize();
    byte[] buffer = new byte[size];
    int length = -1;
    while ((length = instream.read(buffer)) != -1)
    outstream.write(buffer, 0, length);
    instream.close();
    outstream.close();
    conn.commit();
    closeConnection(conn);
    catch (Exception ex)
    System.out.println("Error =- > "+ex.toString());
    private Connection getConnection(String dataBase)
    Connection conn = null;
    try
    DriverManager.registerDriver(new OracleDriver());
    conn = DriverManager.getConnection("jdbc:oracle:thin:@oraclu5:1600:dwz110","so_cs","so_cs");
    catch (Exception ex)
    System.out.println("Error getting conn"+ex.toString());
    return conn;
    private void closeConnection(Connection conn)
    if (conn != null)
    try
    conn.close();
    catch (Exception se)
    System.out.println("Error closing connection in get last imei"+se.toString());
    Works fine:
    Here is the display servlet: Works when main class inserts file
    package mypackage1;
    import java.io.InputStream;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.PrintWriter;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileReader;
    import java.io.FileNotFoundException;
    import java.io.Writer;
    import java.sql.Connection;
    import oracle.jdbc.*;
    import oracle.jdbc.OracleResultSet;
    import oracle.sql.BLOB;
    import org.apache.log4j.Logger;
    import Util_Connect.DataBase;
    public class DisplayLOB extends HttpServlet
    private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
    static final Logger logger = Logger.getLogger(DisplayLOB.class);
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    //response.setContentType(CONTENT_TYPE);
    //PrintWriter out = response.getWriter();
    Connection conn = null;
    PreparedStatement pstmt = null;
    try
    conn = getConnection("wizard");
    //out.println("<html>");
    //out.println("<head><title>DisplayLOB</title></head>");
    //out.println("<body>");
    //out.println("<p>The servlet has received a POST. This is the reply.</p>");
    InputStream is=null;
    oracle.sql.BLOB blob=null;
    response.setContentType("application/msword");
    //response.setContentType("audio/mpeg");
    OutputStream os = response.getOutputStream();
    String term = "1";
    String query = "SELECT docdetail FROM testlob WHERE docno = 1";
    pstmt = conn.prepareStatement(query);
    ResultSet rs = pstmt.executeQuery();
    while (rs.next())
    blob=((OracleResultSet)rs).getBLOB(1);
    is=blob.getBinaryStream();
    int pos=0;
    int length=0;
    byte[] b = new byte[blob.getChunkSize()];
    while((length=is.read(b))!= -1)
    pos+=length;
    os.write(b);
    }//try
    catch (Exception se)
    se.printStackTrace();
    finally
    try
    pstmt.close();
    catch (Exception ex)
    System.out.println("Error closing pstmt "+ex.toString());
    //out.println("</body></html>");
    //out.close();
    private Connection getConnection(String dataBase)
    Connection conn = null;
    try
    conn = DataBase.getPoolConnection(dataBase);
    catch (Exception se)
    logger.fatal("Error getting connection: ",se);
    return conn;
    private void closeConnection(Connection conn)
    if (conn != null)
    try
    conn.close();
    catch (Exception se)
    logger.error("Error closing connection in get last imei",se);
    Here is JSP/Servlet
    <%@ page import="org.apache.log4j.*"%>
    <%@ page contentType="text/html; charset=ISO-8859-1" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>untitled</title>
    <title>Wizard SMS Interface</title>
    <link rel='stylesheet' type='text/css' href='main1.css'>
    <script language='JavaScript' src='copyright.js'></script>
    </head>
    <pre>
    <%
    //HTTP 1.1
    response.setHeader("Cache-Control","no-cache");
    //HTTP 1.0
    response.setHeader("Pragma","no-cache");
    //prevents caching at the proxy server
    response.setDateHeader ("Expires", 0);
    Logger logger = Logger.getLogger("co.za.mtn.wizard.administration.admin01.jsp");
    %>
    </pre>
    <body>
    <FORM ACTION="/WizardAdministration/uploadfile"
    METHOD="POST"
    ENCTYPE="multipart/form-data">
    <INPUT TYPE="FILE" NAME="example">
    <INPUT TYPE="SUBMIT" NAME="button" VALUE="Upload">
    </FORM>
    </body>
    </html>
    <font> <b>Copyright &copy;
    <script>
    var LMDate = new Date( document.lastModified );
    year = LMDate.getYear();
    document.write(display(year));
    </script>
    Mobile Telephone Networks.
    <p align="left"><i><b><font face="Georgia, Times New Roman, Times, serif" size="1"></font></b></i></p>
    package co.za.mtn.wizard.admin;
    import java.io.InputStream;
    import java.util.Enumeration;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.PrintWriter;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileReader;
    import java.io.FileNotFoundException;
    import java.io.Writer;
    import java.sql.Connection;
    import oracle.jdbc.OracleResultSet;
    import oracle.sql.BLOB;
    import org.apache.log4j.Logger;
    import Util_Connect.DataBase;
    public class UploadFile extends HttpServlet
    private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
    //static final Logger logger = Logger.getLogger(UploadFile.class);
    public void init(ServletConfig config) throws ServletException
    super.init(config);
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    String headerName = null;
    Enumeration en = request.getHeaderNames();
    try
    while ( en.hasMoreElements() )
    Object ob = en.nextElement();
    headerName = ob.toString();
    System.out.println("Value for headerNAme is >"+headerName+"<");
    String aaa = request.getHeader(headerName);
    System.out.println("Value for aa is >"+aaa+"<");
    catch (Exception ex)
    System.out.println("Error in extracting request headers"+ex.toString());
    Connection conn = getConnection("wizard");
    BLOB blob = null;
    try
    conn.setAutoCommit(false);
    String cmd = "SELECT * FROM so_cs.testlob WHERE docno = 1 FOR UPDATE";
    PreparedStatement pstmt = conn.prepareStatement(cmd);
    ResultSet rset = pstmt.executeQuery(cmd);
    rset.next();
    blob = ((OracleResultSet)rset).getBLOB(2);
    //File binaryFile = new File("h:\\callcenterpilot.doc");
    //System.out.println("Document length = " + binaryFile.length());
    //FileInputStream instream = new FileInputStream(binaryFile);
    response.setHeader("Content-Type","application/vnd.ms-word");
    String contentType = request.getContentType();
    System.out.println("Content type received in servlet is >"+contentType+"<");
    ServletInputStream instream = request.getInputStream();
    OutputStream outstream = blob.getBinaryOutputStream();
    int size = blob.getBufferSize();
    byte[] buffer = new byte[size];
    int length = -1;
    while ((length = instream.read(buffer)) != -1)
    outstream.write(buffer, 0, length);
    instream.close();
    outstream.close();
    conn.commit();
    closeConnection(conn);
    response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter();
    catch (Exception ex)
    System.out.println("Error =- > "+ex.toString());
    //out.println("</body></html>");
    //out.close();
    private Connection getConnection(String dataBase)
    Connection conn = null;
    try
    conn = DataBase.getPoolConnection(dataBase);
    catch (Exception se)
    System.err.println("Error getting connection: "+se.toString());
    return conn;
    private void closeConnection(Connection conn)
    if (conn != null)
    try
    conn.close();
    catch (Exception se)
    System.err.println("Error closing connection in get last imei"+se.toString());
    This is what the display servlet is showing when the JSP/Servlet insert the document
    -----------------------------7d31422224030e
    Content-Disposition: form-data; name="example"; filename="H:\(your name) Skills Matrix.doc"
    Content-Type: application/msword
    �� ࡱ � > ��     � � ���� � � ���������������������
    Tks
    Andre

    hello,
    there are multiple documents out there, describing the oracle reports server setup. try doc.oracle.com for documentation.
    also it is part of the online-documentation.
    you need to install 9iAS enterprise edition. the server is pre-configured and will listen to the url http://yourserver/dev60cgi/rwcgi60.exe
    passing only this url you will get a help-screen, describing the syntax.
    regards,
    the oracle reports team

  • Converting an html file with jsp contents to a text file for download

    Hi guys,
    I'm currently having troubles with downloading a .jsp file to a doc file.
    The thing is i am able to download the desired file and make it as a .doc but when i open it with ms word 2007 i can only see the content of the html. The dynamic content generated from the database and reflected on the .jsp page that i suppose to download and convert to .doc file doesn't show.. I hope someone could help me... My servlet code is this:
    public class FileDownload extends HttpServlet
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    try
    String originalFileName="localhost:8080//Appsdev//reportresults1.jsp";
    File f=new File(originalFileName);
    System.out.println("THE 1st f:"+f);
              response.setContentType("application/octet-stream");
    response.setHeader("Content-Disposition", "attachment; filename=tryreport.doc;");
    response.setHeader("Cache-Control", "max-age=0");
    byte[] buf = new byte[1024];
    FileInputStream inStream = new FileInputStream(f);
    OutputStream outStream = response.getOutputStream();
    int sizeRead = 0;
    int size = 0;
    while ((sizeRead = inStream.read(buf, 0, buf.length)) != -1)
    outStream.write(buf, 0, sizeRead);
    size += sizeRead;
    inStream.close();
    outStream.close();
    catch(Exception e)
    e.printStackTrace();
    }

    Hi BalusC,
    sorry for the double post i'm newly registered and it's my first post before i was just reading other's threads.
    well last night while i was reading and researching for a solution a came across this.
    <%@ page language="java" contentType="application/msword"%> naturally for my other jsp pages, the contentType is text/html so when the page loads it display in the browser. But with application/msword when i direct the page to the jsp page that i want to download and set the contentType with that...it prompts a window like when you're downloading the one with the <open with and save as>. It works fine to, i was able to see the report that i have to download and it is formatted very much like what i am seeing on the browser. My only concern now is the file i am able to download is a .jsp file how could i change that to a .doc file and be able to see the same content like the one with the .jsp file that i have right now.... any help or examples would be greatly appreciated. I didn't use the servlet anymore because even though i am able to download there is no content the html parts only but iam able to change the extension for the file...thanks again! ^ ^

  • Report Generation Toolkit: Table of Contents in MS Word

    Hello forum users,
    I would like to add a table of contents to a MS Word document, using the Report Generation Toolkit.
    I couldn't find a VI in the toolkit that does that, so I tried to modify the VI "Word Insert Field.vi". Doing so, I could access a property node of the class "Word._Document"  and an invoke node of the class "Word.TablesOfContents" with the method "Add".
    As this modified VI does not belong to the private LabVIEW class "NI_Word.lvclass", it is not possible to unbundle the (type cast) "report in" wire to get the "Word._Document" class reference. I can't add the modified VI to the NI_Word class either, because it is password protected.
    There are so many methods and properties that are not used in the official Report Generation Toolkit, like this one. How can I access them?
    Or maybe there is another way to add a table of contents to a MS Word document (programmatically). Maybe I have to use a template. I rather wouldn't, though.
    Operating System: Windows 7 64bit
    LabVIEW: 2009 [9.0 (32bit)]
    Report Generation Toolkit: 2009
    MS Office: 2003 SP1
    Thank you for reading an answering.
    Solved!
    Go to Solution.
    Attachments:
    Word_Insert_TOC.png ‏68 KB

    Hello again,
    in the "Word Specific" > "Word Advanced" Palette of the Report Generation Toolkit, there is a VI called "Word Get ActiveX References" which essentially unbundles the private "report" data stream / wire. Thus, I can use the property and invoke nodes that make use of the "Add TablesOfContents" method.
    I hope, that helps other users as I didn't find too many topics on Report Generation. Maybe it's just too easy...
    Attachments:
    Word_Insert_TOC_fix.png ‏60 KB

  • How to show content from microsoft word and pdf on a page

    Hi,
    I have a microsoft word file stored in content repository and I want to show it in web page. When I drag and drop it using content presenter it shows file as a link with some extra details like created by, last modified by etc. I want content to appear in UI page itself. Content of document should get converted to html at runtime and then appear in UI. Is it possible?
    Thanks
    Sanjeev

    Sanjeev,
    I see you have as similar requirement you posted in the thread here :
    Skipping ucm login form when showing content on webcenter application.
    InBound Refinery (IBR) would be the easiest way to accomplish this though.
    Once you have IBR installed and configured (you need to pick what formats need to be converted in the refinery, and in your case, choose MS Office formats),
    You can use the document viewer taskflow to render PDF versions of your Word/Excel or PDF documents on a webcenter page. There is little to no setup required for this, beyond configuring IBR (but configuring IBR is fairly involved) and selecting what MIME types you want IBR to process.
    Another thing to watch out for if you are using Spaces is, make sure you set the context root for UCM properly though EnterpriseManger.
    Dynamic Converter can also be used to get similar results. You mention that you are using an Iframe, that means the client is making a request to UCM directly, and to avoid re-authenticating there, you should have SSO enabled. With Dynamic converter, you can use a URL of the form :
    http:// +<host>:<port>+ / +<context_root>+ /idcplg?IdcService=GET_DYNAMIC_CONVERSION&dDocName= +<docID>+ &RevisionSelectionMethod=LatestReleased
    To get an HTML rendition of that document.
    Hope it helps !
    -Jeevan
    Edited by: Jeevan Joseph on May 14, 2012 3:07 PM
    Edited by: Jeevan Joseph on May 14, 2012 3:08 PM

  • Open xml relationship target is NULL when inserting chart into a mapped rich text content control in Word 2013

    Hi,
    I have a word document with a rich text content control that is mapped to a CustomXml. You can download an example here
    http://1drv.ms/1raxoUr
    I have looked into the specification ISO/IEC 29500-1:2012 and i understand that the attribute Target for the element Relationship can be set to NULL at times(Empty header and footer in the specification).
    Now, i have stumbled on Target being NULL also when inserting a diagram into a word document. For example:
    <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject"
    Target="NULL" TargetMode="External" xmlns="http://schemas.openxmlformats.org/package/2006/relationships" />
    Why is Target="NULL" and how should i interpret that Target is null?
    Br,
    /Peter
    Peter

    Hello Peter,
    The relationship in question is associated with the externalData element (ISO/IEC 29500-1:2012 §21.2.2.63). For the other two charts in this document, the corresponding relationships are of the other allowable form:
      <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/package" Target="../embeddings/Microsoft_Excel_Worksheet1.xlsx"/>  <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/package" Target="../embeddings/Microsoft_Excel_Worksheet2.xlsx"/>
    For charts 1 and 3 in your document, the data can be edited via the Chart Tools ribbon control. The option to edit data is not available for chart 2. The data used to create chart 2 is the same default spreadsheet data used for chart 1, and in fact the spreadsheet
    references are still present in the file format, despite there being no apparent link to a spreadsheet for chart 2.
    Thus, it appears that Target="NULL" in this context means that the chart is not associated with an external data source. The specification doesn't have much to say about the semantics of the Target attribute (ISO/IEC 29500-2:2012 §9.3.2.2) beyond
    the fact that it be a valid xsd:anyURI, which the string "NULL" is.
    It looks like there is some unexpected interaction between the chart and the content control. I don't think the file format is the issue. You will probably need to pursue that behavior from the product perspective via a support incident, if that behavior
    is unexpected. If you still have questions about what is seen in the file format, please let me know.
    Best regards,
    Matt Weber | Microsoft Open Specifications Team

Maybe you are looking for

  • How can I see more than one month history in safari?

    I need to see the safari history longer than one month. Can I change that?

  • Grid in Canvas window?

    Is it possible in the canvas window to put up a grid to align text more effectively? It is hard to align text just by eye. I know in avid you can put up a grid as a guide to align text, can you do the same in FCP? Also when using the Basic Motion con

  • Split String value into internal table at Carriage return

    Hi All, I have given a string type context ( text edit  box ) to the user to enter the values. The data can have carriage returns also. My Requirement is that I want to split the data at carriage returns and store it in my tables. I tired with a cons

  • Openscript is supporting SOAP 1.2 protocol. Really?

    Hello guys, can you help me with this one? I have an OpenScript project about testing web services and the SOAP protocol's version is 1.2. Even though in the documentation it says that OATS is supporting SOAP 1.2 I'm unable to locate which variable t

  • Iphoto clean up

    Before reading detailed instructions for Photoshop Elements 6, used the Adobe Bridge to open a number of my photo files. As a result when I attempted to open the photos in iPhoto I could not because they had become corrupted. I replaced the corrupted