Transfering word data to word template report

Hello,
Could someone help me here please:  I have a draft report generated from an equipment (see attached document name draft report.doc). I need to transfer data from this draft to a template ( see attached doc named template. doc), and this should look like the final report (see attached doc named final report.doc).
I tried this (see the attached code), it seems to work but I am not able to get transfer the image (the graph) and also I need the right formating as shown on the example of the attached final report.
Any help will be appreciated.
Attachments:
Draft report.doc ‏39 KB
word_report.vi ‏76 KB
template.doc ‏35 KB

For the formatting you can use the Set Font Report.vi with font settings calibri size 8. Extracting a picture from a Word document to insert it into another Word document is not a simple task that can be accomplish with the VIs of the Report Generation Toolkit. You will have to use Word ActiveX methods and properties. Attached is a vi that copy the first picture of the draft report and copy it to the Image1 bookmark (there are no Image bookmarks define in your template so you will have to add them) of the template report.
Note, your template report should be a .dot file, not a .doc file.
Ben64
Attachments:
Word Copy and Paste Picture.vi ‏22 KB

Similar Messages

  • Data from word tables to excel master spreadsheet

    Hello, I'm looking to take data from my damage report forms that come in maybe 20 times a week. This data needs to goto a master excel spreadsheet. I've managed to find a macro that does this but it does not paste it into excel the way I require and also
    extracts data I do not require.
    The word document contains a column of headings on the left, these will be the master spreadsheet sheet column headers. These will be on the spreadsheet already so I don't need them copied. 
    The other  two columns contains the data I will need to xfer to excel. I was thinking bookmarks can help here but I'm unsure if these will save over from the original template?
    So,  if there is some code out there that can help, brilliant. It will be an excel macro in the master spreadshee. TThat takestthe datadfrom the active word doc or by selecting the word doc in its folder. 
    Fingers crossed.
    Joseph 

    Hi Joseph,
    You should be able to run below code to get the data out of the Tabel(s) of a Word Document from within Excel.
    You can modify the code accordingly to your needs to specify the range where you want the data to be copied.
    I have already slightly modified the code to skip the header information.
    Sub ImportWordTable()
    Dim wdDoc As Object
    Dim wdFileName As Variant
    Dim TableNo As Integer 'table number in Word
    Dim iRow As Long 'row index in Excel
    Dim iCol As Integer 'column index in Excel
    wdFileName = Application.GetOpenFilename("Word files (*.docx),*.docx", , _
    "Browse for file containing table to be imported")
    If wdFileName = False Then Exit Sub '(user cancelled import file browser)
    Set wdDoc = GetObject(wdFileName) 'open Word file
    With wdDoc
    TableNo = wdDoc.tables.Count
    If TableNo = 0 Then
    MsgBox "This document contains no tables", _
    vbExclamation, "Import Word Table"
    ElseIf TableNo > 1 Then
    TableNo = InputBox("This Word document contains " & TableNo & " tables." & vbCrLf & _
    "Enter table number of table to import", "Import Word Table", "1")
    End If
    With .tables(TableNo)
    'copy cell contents from Word table cells to Excel cells
    ' start with row 2 to skip headers
    For iRow = 2 To .Rows.Count
    For iCol = 1 To .Columns.Count
    ' Define starting point here
    Cells(iRow - 1, iCol) = WorksheetFunction.Clean(.cell(iRow, iCol).Range.Text)
    Next iCol
    Next iRow
    End With
    End With
    Set wdDoc = Nothing
    End Sub
    The source is this link:
    Export Word Table in Excel
    Also this Forum is more for generic Excel questions, for better response post in Excel For Developer Forum.
    Hope this helps,
    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
    Please vote an answer helpful if they helped. Please mark an answer(s) as an answer when your question is being answered.

  • Import text / word documents into a Crystal Report

    Good morning,
    I need to import a Text file/Word Doc. into a crystal report, these files are based on a field, i mean
    The data in the field is "alr-finclk", then the file to import is alr-finclk. if the data is "alr-pro" the file is alr-pro and so on..
    Have we any way of getting this report ?
    Thks for your help
    Jose Marin

    I have found the following formula which is running when the file isn't a big one...,
    StringVar sFile;
    NumberVar i;
    i := 1;
    while FileGetText( "c:\file.txt", i) <>"" Do
    sFile := sFile + FileGetText( "c:\file.txt", i);
    i := i + 1
    sFile;
    but when the file is big i get
    A STRING CAN BE AT MOST 65534 CHARACTERS LONG
    Any way of solving this?
    Thks
    Jose Marin

  • How can I display the date a word document was last modified on my web page?

    I have lists of links to word documents on my web pages. I
    want to be able to show the date the word document was last
    modified next to each link. My pages are straight html.
    Thanks.

    >but I would have to go to each individual file (I have
    hundreds) and put this code on each link.
    No, you can use the FileSystemObject to get a list of the
    files in the directory. See if you can adapt this for your site:
    <link href="/CSS/dirlist.css" rel="stylesheet"
    type="text/css">
    <%
    Function FormatSize(SizeInBytes)
    if SizeInBytes > 1024^2 then
    FormatSize = formatnumber(SizeInBytes / 1024^2,2) & "
    MB"
    elseif SizeInBytes > 1024 then
    FormatSize = formatnumber(SizeInBytes / 1024,2) & " KB"
    else
    FormatSize = SizeInBytes & " Bytes"
    end if
    end function
    %>
    <%
    dim parts
    dim part
    dim BrowseLine
    dim RelLink
    dim i
    url = Request.ServerVariables("URL")
    Parts = split(URL,"/")
    for part = 1 to ubound(Parts)-1
    ' calc link
    RelLink = ""
    for i = 1 to ubound(Parts) - part - 1
    RelLink = RelLink & "..\"
    next
    If trim(BrowseLine) <> "" then
    BrowseLine = BrowseLine & "/"
    end if
    BrowseLine = BrowseLine & "<A href=" & RelLink
    & ">" & parts(part) & "</A>"
    next
    ' add "back" link
    BrowseLine = Browseline & "  " &
    "<A href='javascript:history.back();'><img
    src='/images/return.gif' border=0></A>"
    Response.Write "<P class = 'NavTop'>" & BrowseLine
    & "</P>"
    Dim fso
    set fso = server.CreateObject("Scripting.fileSystemObject")
    dim fldr
    dim fle
    %>
    <a href="../index.asp"><img
    src="../images/leftbanner.jpg" width="343" height="70"
    border="0"></a>
    <link href="/CSS/dirlist.css" rel="stylesheet"
    type="text/css">
    </p>
    <p></p>
    <table width="85%" border="0" cellspacing="0"
    cellpadding="0">
    <tr>
    <th width="63%"><div
    align="left">   Document
    Name</div></th>
    <th width="14%">Size</th>
    <th width="23%"><div
    align="left">  Date</div></th>
    </tr>
    <%
    ' display folders
    for each fldr in
    fso.GetFolder(server.MapPath(".")).SubFolders
    %>
    <tr>
    <td class="FileName"> <a href='<%=
    fldr.Name %>'><img src="/images/folder.gif" border=0>
    <%= fldr.Name %></a></td>
    <td class="FileSize">  <%=
    FormatSize(fldr.Size) %></td>
    <td class="FileDate"><div
    align="left">  <%=
    FormatDateTime(fldr.DateLastModified,2)
    %></div></td>
    </tr>
    <%
    next
    %>
    <%
    ' display files
    for each fle in fso.GetFolder(server.MapPath(".")).Files
    dim ext
    ext = fso.GetExtensionName(fle.path)
    if (ext <> "asp") and (ext <> "scc") then
    %>
    <tr>
    <td class="FileName"> <a href='<%=
    escape(fle.Name) %>'><img src="/images/file.gif"
    width="14" height="16" border=0>
    <%= fle.Name %></a></td>
    <td class="FileSize">  <%=
    FormatSize(fle.Size) %></td>
    <td class="FileDate"><div
    align="left">  <%=
    FormatDateTime(fle.DateLastModified,2) %></div></td>
    </tr>
    <%
    end if
    next
    Set fso = Nothing
    Set fle = Nothing
    Set fldr = Nothing
    %>
    </table>
    <p><a href="/index.asp">Return to Home
    Page</a></p>

  • Output date in words on a smart form

    I need to output a date in words on a smart form. As in today's date (01/13/2009) should be output as January 13, 2009. How do I acheieve this? Please could someone help me out with this one?

    HI
    Check the below FM
    Function module              HR_IN_GET_DATE_COMPONENTS
    Import parameters               Value
      IDATE                           10-09-2009      
    Export parameters               Value
      DAY                             09
      MONTH                           10
      YEAR                            2009
      STEXT                           OCT
      LTEXT                           October
      USERDATE                        10-09-2009
    concatenate the values as per your requirement...

  • In "add a field" the word Date is not high lighted and I can't add anything to it.  How do I get this to open?

    I have an iMac desktop and I can't get the word "Date" to open in my iCal.  It is not highlighted.  How do I get this to open?

    An event can only have one date. There is already a date field. Why do you want another date field, perhaps we can find another way?

  • How user data in word/exel file is going to to be stored in SharePoint content databse

    Where user data in word/exel file is going to to be stored in SharePoint farm. Kindly share MS KBs on this.

    Can you expand on what you want to know?
    'Documents' are uploaded into SharePoint where they are then sent to SQL where they are split into segments and are stored in a table, typically in the 'AllDocs' table (which you should not touch directly).
    KB articles are generally targeted. If you can tell us what you want to know specifically we might be able to find the relevant one.

  • SQL Loader - MS Word data

    Hi All,
    I want to load MS word data using SQL Loader into my tables. It loads fine except for certain features like bullets and numbering gets loaded as junk characters.
    My sql loader version is Release 8.0.6.3.0.
    Please help. Hope I am clear. If not please let me know

    My DB is Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    My OS is AIX 3
    My sql loader version is Release 8.0.6.3.0.
    Table
    CREATE TABLE DUMPTABLE
    Case_ID VARCHAR2(30) NOT NULL,
    A_Status VARCHAR2(30) ,
    Emp_Name VARCHAR2(100) ,
    Emp_no VARCHAR2(30) ,
    Counter_sign_mgr_comments VARCHAR2(1000) ,
    C_KPI1_Name VARCHAR2(1000)
    Sample data
    79717^ST 1 PEND EMP 1^Test1^1025^Risk Management ^Account Monitoring • Proactively monitor • Early identification • Write Call Memos
    79718^ST 1 PEND EMP 2^Test2^1026^Leading Courageously ^Account Monitoring • Need To Improve • ensure compliance • Write Call Memos
    Control file
    OPTIONS (BINDSIZE=160782, SKIP=1)
    LOAD DATA
    INFILE '/home/apsprod/DUMP.txt'
    BADFILE '/home/apsprod/REJECTEDRECORDS.txt'
    REPLACE
    INTO TABLE DUMPTABLE WHEN (Case_ID != '99')
    fields terminated by "^" optionally enclosed by '"' trailing nullcols
    Case_ID,
    A_Status,
    Emp_Name,
    Emp_no,
    Counter_sign_mgr_comments char(1000),
    KPI1_Name char(1000)
    With the above, the data gets loaded but when I select from the table, all the characters are loaded fine but all the bullets in the data is as some junk character
    I also tried giving CHARACTERSET as WE8ISO8859P1 and also as UTF8 in the control file
    Please help. Hope I am clear. If not please let me know

  • Disable automatic insertion of date in Word 2007

    Hi
    We use Office 2007 Danish and I need to find the setting that disables the automatic correction/insertion of dates in Word 2007. If I want to write
    24. february 2011 it automatically corrects it to 24. february 2011-03-17. I have looked everywhere, but can't find the setting that I have to disable?
    Can anyone help?
    /Lasse

    THIS WORKED !  Thanks Stefan.  Sadly I have no understanding of how and why it worked and I wish MS would make something like this much easier to turn on and, more importantly, turn it OFF.
    Thank you very much, I miss the old ? Help at the top of the toolbar.
    I'm glad you found my reply useful. :-)
    Note that newer versions of Word make it easier to turn off AutoComplete suggestions. In Word 2010 and 2013, you'll find the option at File tab | Options | Advanced.
    Stefan Blom, Microsoft Word MVP

  • How to download data in Word or Excel file from webdynpro?

    Hello everybody,
    In my webdynpro application, I want to download my Table control data in word or excel file. Is there anyway to do this?
    Thanks in advance,
    Bhavik

    I am sorry.Please ignore this reply
    Please go through the following
    downloading internal table contents to excel sheet
    Regards,VIP
    Message was edited by: Anilkumar Vippagunta
    Message was edited by: Anilkumar Vippagunta

  • Nd suggestion for importing Word doc into Pages template....

    I have a rather lengthy Word file that I want to import into Pages using one of its templates (Travel Journal). Is there a way to import the Word file directly into this template?
    I know you can import a Word doc into Pages but once you do that, you have to do the designing from scratch (or at least that what it looks like you have to do).
    I like the Travel Journal template and wanted to use that for my Word doc. Any suggestions for getting my Word doc into this template, without having to cut and paste each section?
    I like the template because of the varied page layout options and I don't want to have to recreate from scratch!
    Help!

    Hello Debbie,
    as I know there is no way to get what you want. I think you have to load the Word document into Pages and than you have to copy and paste all the text and media objects into the Pages template.

  • Attach Word document to Web template

    Hello,
    I attached Word document to Web template. When I run Web template I dont see this document anywhere.
    How and where its possible to see it?
    Thanks

    Hi Aleksandrs,
    Have you seen this:
    http://help.sap.com/saphelp_nw04/helpdata/en/60/1c143bfaed272de10000000a11402f/content.htm

  • Can I write dates or words on photos? In iPhoto.

    Can I write dates or words on photos? In iphoto.

    You mean across the fac of the shot? No. You'll need an external editor for that.
    In order of price here are some suggestions:
    Seashore (free)
    The Gimp (free)
    Graphic Coverter ($45 approx)
    Acorn ($50 approx)
    Pixelmator ($50 approx)
    Photoshop Elements ($75 approx)
    There are many, many other options. Search on MacUpdate. You can set Photoshop (or any image editor) as an external editor in iPhoto. (Preferences -> General -> Edit Photo: Choose from the Drop Down Menu.) This way, when you double click a pic to edit in iPhoto it will open automatically in Photoshop or your Image Editor, and when you save it it's sent back to iPhoto automatically. This is the only way that edits made in another application will be displayed in iPhoto.

  • To List the Date in Words

    hi mates
    i need to get the date from the user and display the date in words. without using any FM.
    can any one guide me. thanks in advance.
    regards
    mano
    Edited by: manoj murugesan on Mar 20, 2008 3:11 PM

    here you go
    DATA:
      day_spelt(255),
      year_spelt(255).
    DATA:
      date_suf(2),
      year_stuf LIKE spell,
      dt_w_suff(4),
      out(100),
      month(15),
      it_month LIKE STANDARD TABLE OF month.
    DATA ldate(20).
    PARAMETERS: my_date LIKE sy-datum DEFAULT sy-datum.
    START-OF-SELECTION.
      PERFORM build_month.
      READ TABLE it_month INTO month INDEX my_date+4(2).
      PERFORM make_day_words  USING my_date+6(2) day_spelt.
      PERFORM make_year_words USING my_date(4) year_spelt.
      CONCATENATE year_spelt month day_spelt INTO out
        SEPARATED BY space.
      WRITE:/ out.
    *&      Form  make_year_words
    FORM make_year_words USING    p_year
                                  p_spelt.
      DATA:
        cent_word(40),
        tens_word(40),
        unit_word(40).
      DATA:
        BEGIN OF year_rec,
          thou,
          hund,
          tens,
          unit,
        END OF year_rec.
      year_rec = p_year.
      CASE year_rec-tens.
        WHEN  '0'.
          IF year_rec-unit = '0'.
            CLEAR tens_word.
          ELSE.
            tens_word = 'and'.
          ENDIF.
        WHEN  '1'.
          CASE year_rec-unit.
            WHEN '0'. tens_word = 'Ten'.
            WHEN '1'. tens_word = 'Eleven'.
            WHEN '2'. tens_word = 'Twelve'.
            WHEN '3'. tens_word = 'Thirteen'.
            WHEN '4'. tens_word = 'Fourteen'.
            WHEN '5'. tens_word = 'Fifteen'.
            WHEN '6'. tens_word = 'Sixteen'.
            WHEN '7'. tens_word = 'Seventeen'.
            WHEN '8'. tens_word = 'Eighteen'.
            WHEN '9'. tens_word = 'Nineteen'.
          ENDCASE.
        WHEN '2'. tens_word = 'Twenty'.
        WHEN '3'. tens_word = 'Thirty'.
        WHEN '4'. tens_word = 'Forty'.
        WHEN '5'. tens_word = 'Fifty'.
        WHEN '6'. tens_word = 'Sixty'.
        WHEN '7'. tens_word = 'Seventy'.
        WHEN '8'. tens_word = 'Eighty'.
        WHEN '9'. tens_word = 'Ninety'.
      ENDCASE.
      IF year_rec-tens NE '1'.
        CASE year_rec-unit.
          WHEN '1'. unit_word = 'One'.
          WHEN '2'. unit_word = 'Two'.
          WHEN '3'. unit_word = 'Three'.
          WHEN '4'. unit_word = 'Four'.
          WHEN '5'. unit_word = 'Five'.
          WHEN '6'. unit_word = 'Six'.
          WHEN '7'. unit_word = 'Seven'.
          WHEN '8'. unit_word = 'Eight'.
          WHEN '9'. unit_word = 'Nine'.
        ENDCASE.
      ENDIF.
      CASE year_rec-hund.
        WHEN '0'.
          cent_word = 'Two Thousand'.
        WHEN '1'.
          cent_word = 'Twenty One Hundred'.
        WHEN '9'.
          cent_word = 'Nineteen Hundred'.
        WHEN '8'.
          cent_word = 'Eighteen Hundred'.
      ENDCASE.
      CONCATENATE cent_word tens_word INTO p_spelt
        SEPARATED BY space.
      IF NOT unit_word IS INITIAL.
        CONCATENATE p_spelt unit_word INTO p_spelt
          SEPARATED BY space.
      ENDIF.
    ENDFORM.                    " make_year_words
    *&      Form  make_day_words
    FORM make_day_words USING    p_day
                                 p_day_spelt.
      DATA: wk_word(20).
      CASE p_day(1).
        WHEN  '1'.
          CASE p_day+1(1).
            WHEN '0'. p_day_spelt = 'Ten'.
            WHEN '1'. p_day_spelt = 'Eleven'.
            WHEN '2'. p_day_spelt = 'Twelve'.
            WHEN '3'. p_day_spelt = 'Thirteen'.
            WHEN '4'. p_day_spelt = 'Fourteen'.
            WHEN '5'. p_day_spelt = 'Fifteen'.
            WHEN '6'. p_day_spelt = 'Sixteen'.
            WHEN '7'. p_day_spelt = 'Seventeen'.
            WHEN '8'. p_day_spelt = 'Eighteen'.
            WHEN '9'. p_day_spelt = 'Nineteen'.
          ENDCASE.
          EXIT.
        WHEN OTHERS.
          CASE p_day+1(1).
            WHEN '1'. p_day_spelt = 'First'.
            WHEN '2'. p_day_spelt = 'Second'.
            WHEN '3'. p_day_spelt = 'Third'.
            WHEN '4'. p_day_spelt = 'Fouth'.
            WHEN '5'. p_day_spelt = 'Fifth'.
            WHEN '6'. p_day_spelt = 'Sixth'.
            WHEN '7'. p_day_spelt = 'Seventh'.
            WHEN '8'. p_day_spelt = 'Eighth'.
            WHEN '9'. p_day_spelt = 'Nineth'.
            WHEN '0'. CLEAR p_day_spelt.
          ENDCASE.
      ENDCASE.
      CASE p_day(1).
        WHEN '0'. EXIT.
        WHEN '2'. wk_word = 'Twenty'.
        WHEN '3'. wk_word = 'Thrity'.
      ENDCASE.
      CONCATENATE wk_word p_day_spelt INTO p_day_spelt
        SEPARATED BY space.
    ENDFORM.                    " make_day_words
    *&      Form  build_month
    FORM build_month.
      month = 'Janurary'. APPEND month TO it_month.
      month = 'Feburary'. APPEND month TO it_month.
      month = 'March'. APPEND month TO it_month.
      month = 'April'. APPEND month TO it_month.
      month = 'May'. APPEND month TO it_month.
      month = 'June'. APPEND month TO it_month.
      month = 'July'. APPEND month TO it_month.
      month = 'August'. APPEND month TO it_month.
      month = 'September'. APPEND month TO it_month.
      month = 'October'. APPEND month TO it_month.
      month = 'November'. APPEND month TO it_month.
      month = 'December'. APPEND month TO it_month.
    ENDFORM.                    " build_month

  • How do I transfer data files (word, Quickbooks, pdf, etc.) to the ipad?

    How do I transfer data files (word, Quickbooks, pdf, etc.) to the ipad for safe store and possible reading and manipulation of some key files (word and Pdf)?

    You first need an app, or apps, that are capable of reading/storing, and possibly editting them - without the app(s) there is nowhere to copy them to. As to how you then get the files onto the iPad depends upon the app(s) that you are using : iBooks (free app which can store/read PDFs) is via iTunes and the Books section of your computer's iTunes library. Other apps can use the file sharing section at the bottom of the device's apps tab on your computer's iTunes, some apps have wifi capability so that you can copy to/from them via your wifi network, and you may also be able to transfer email attachments into the app.

Maybe you are looking for

  • Can a masking layer have more than one mask?

    I have a mask layer with a rectangular mask in it. Inder this layer I and a nasked layer with an object to be masked on it This works fine When I all another object to be masked in thesame layer and relevant mask in the same masking layer the sacond

  • Order confirmation through BAPI

    Dear Gurus, I am having a scenarion for heat treatment proces. In a single HT cycle there is a possibility of clubbing the multiple orders. For example I am having 2 orders... one for material A and another for material B. In these two orders operati

  • A start error

    when i start weblogic server from workshop, it is fault: <2002-6-11 上午10时17分15秒> <Error> <HTTP> <101083> <Connection failure java.net.SocketException: ReadFile failed: 指定的网络名不再可用。 (error 64, fd 1900) at weblogic.socket.NTSocketMuxer.initiateIO(Native

  • Account Identification - New field - Search

    Dear Experts,    In Account Identification screen I have added a new field from the BOL object; but the search is not happening with this field? How would I accomplish this? Warm Regards, Kanthimathi

  • A way to transform a template chart/map into an editable template?

    Hello! I've been curious about this for a while now, so I was hoping that perhaps some of you knowledgeable people in here could shed some light on this for me. I often use Adobe Illustrator to create charts, maps and diagrams that contains texts for