MS Word OLE integration i new UI??

Hi Folks
We are in the middle of an upgrade from CRM 3.1 to CRM2007.  And the new WEB UI.
In our old SAP gui, we have developped a ABAP Report program that collects a lot of data, and then via OLE integrated to a Word document. We didn't use the DOI, but just called a lot of methods in Word.
I have tried to execute our old ABAP Report via the Transaction Launcer in the new UI. And the first part of
it - collecting all the data - works fine. But the integration to word does not work.
Does anyone have an idea how to make this integration. The result of the progam is a nice formatted Word Document with a lot of fixed texts combined wit data from the CRM system!
Best regards
Carsten

<b>word_document</b> = location of the existing document in which you want to change the val (d:\Documents and Settings\user\Desktop\Doc1.doc)
<b>File_name</b> = File name to which the modified file to be saved (just give the same file name you opened - Doc1.doc - just the file name and not the whole path)
<b>Download_path</b>
path for downloading  (d:\Documents and Settings\user\Desktop\)
<b>Data_tab</b> = any internal table
<b>filednames</b> = field names of the internal table in a table .  for example if your itab has fielda, fieldb and fieldc , then this table first record value should be fielda and second record value should be fieldb, etc.
Hope this is clear.
Regards
Raja

Similar Messages

  • Change bookmark/text in footer (OLE-integration)

    Hi folks
    I have a ABAP program with OLE integration to Word (Old program, and therefore the old way to integrate - not DOI!) So far so good. It has been working for the last 4 years. Now I want to add some extra code, so I can insert a value to a bookmark in the footer. Alternative is to change a word in the footer. I have been fighting with the code for a quite a long time.
    My problem is to convert the shown macro to ABAP Method/Property coding!!
    The cursor is placed in the top of the document. In the footer I have a text: &Z_FOOT2&. This text I want to change with anoter value. No problem when I just activates the function Change All (recorded in the macro) - but how to do in ABAP???
    Hope You can help me!!
    REPORT ztces_word_test
           NO STANDARD PAGE HEADING
           LINE-SIZE 255
           MESSAGE-ID zcrm00.
    * OLE - Word Integration
    INCLUDE ole2incl.
    DATA o_word             TYPE ole2_object.
    DATA o_docs             TYPE ole2_object.
    DATA o_doc              TYPE ole2_object.
    DATA o_selection        TYPE ole2_object.
    DATA o_range            TYPE ole2_object.
    DATA: o_find            TYPE ole2_object.
    DATA skabelon(255)    TYPE c.
    CONSTANTS: tab(2) TYPE x VALUE '0D0A',
               wdtoggle TYPE i VALUE 9999998,
               c_true  TYPE i VALUE -1,
               c_false TYPE i VALUE 0.
    CONSTANTS: true VALUE 1, false VALUE 0.
    CONSTANTS:
       c_wdstory     TYPE i VALUE 6,
       c_wdextend    TYPE i VALUE 1.
    skabelon = 'C:SAPWORKDIRCRM Kundeplanfooter_change.dot'.
    CREATE OBJECT o_word 'Word.Application'.
    SET PROPERTY OF o_word 'Visible' = '1'.
    CALL METHOD OF o_word 'Documents' = o_docs.
    CALL METHOD OF o_docs 'Add' = o_doc
      EXPORTING
      #1 = skabelon.
    IF o_doc IS INITIAL.
      CALL METHOD OF o_word 'Quit'
        EXPORTING
        #1 = 0
        #2 = 1
        #3 = -1.
      COMMIT WORK.
      MESSAGE e001(ztces00) WITH skabelon 'IIE'
             RAISING skabelon_findes_ikke.
      FREE OBJECT o_doc.
      FREE OBJECT o_docs.
      FREE OBJECT o_word.
    ENDIF.
    CALL METHOD OF o_word 'Selection' = o_selection.
    * Here I have the MACRO which I recorded in the Word Document
    *    Selection.Find.ClearFormatting
    *    Selection.Find.Replacement.ClearFormatting
    *    With Selection.Find
    *        .Text = "&Z_FOOT2&"
    *        .Replacement.Text = "New footer text"
    *        .Forward = True
    *        .Wrap = wdFindContinue
    *        .Format = False
    *        .MatchCase = False
    *        .MatchWholeWord = False
    *        .MatchWildcards = False
    *        .MatchSoundsLike = False
    *        .MatchAllWordForms = False
    *    End With
    *    Selection.Find.Execute Replace:=wdReplaceAll
    *GET PROPERTY OF o_selection 'Find' = o_find.
    CALL METHOD OF o_selection 'Find' = o_find
      EXPORTING
      #01 = 'Z_FOOT2'.
    * Selection.FIND.ClearFormatting
    * Selection.FIND.Replacement.ClearFormatting
    *GET PROPERTY OF o_selection 'Find' = o_find.
    *CALL METHOD OF o_selection 'Find' = o_find.
    *CALL METHOD OF o_find 'Replacement' = o_find.
    *CALL METHOD OF o_find 'ClearFormatting' = o_find.
    CALL METHOD OF o_find 'Execute'
    *CALL METHOD OF o_selection 'Execute'
      EXPORTING
      #01 = '&Z_FOOT2&'
      #02 = true
      #03 = true
      #04 = false
      #05 = false
      #06 = false
      #07 = false
      #08 = false
      #09 = false
      #10 = 'New footer text'.
    CALL METHOD OF o_selection 'HomeKey' = o_range
      EXPORTING
      #1 = c_wdstory.
    FREE OBJECT o_word.
    Best regards
    Carsten :o)

    Hi,
    Go to Tocde: So10
    Give  as follows:
    Text Name       :ZXX_ZXXXXX_FOOTER
    Text ID              ST
    Language             EN
    and enter change mode, change whatever modifications you want.
    after run Standard program: RSTXTRAN  for adding Standradt text to transport request
    Regards
    Jana

  • OLE Integration

    To: [email protected]
    cc:
    Subject: OLE Integration
    I'm trying to perform OLE automation between Forte and MS Word (95). I'm
    doing this because I want to generate a Word document based on information
    within my Forte application. According to the documentation within the
    "Integrating with External Systems" manual, the TOOL commands to link up
    with MS Word should be as follows:
    WordApp : CDispatch = new;
    WordApp.CreateUsingProdID('Word.Basic');
    However, when I try to run this I end up with the following error when
    executing the CreateUsingProdID method:
    No source is available for method "CUnknown.CreateUsingCLSID".
    I received the same error on both version 2 and 3 of Forte. This is a
    method internal to Forte so I don't know what code should be placed in it
    or whether I even have the option of entering my own code.
    Any suggestions on how this should work?
    David Wilbur email: [email protected]
    University of Windsor phone: 519-253-3000 ext. 2779
    Windsor, Ontario Canada
    -----------------------------------------------

    get java COM (OLE) bridge njawin at http://www.simtel.net/product.php?url_fb_product_page=60701

  • Open Word docs with the new Pages?

    Pages does not open. I had the new one installed but apparently had the old one still up. How can I open Word docs with the new Pages?

    Pages 5 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5.01 can not open Pages 5.1 files and you will get the warning that you need a newer version.
    Pages 5 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Once opened and saved in Pages 5.1 files can not be opened in Pages 5.
    Anything that is saved to iCloud is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has removed over 95 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Archive/trash Pages 5, after exporting all Pages 5 files to Pages '09 or Word .docx, and rate/review it in the App Store, then get back to work.
    Peter

  • I'm having trouble opening a word document on my new Macbook Pro. I opened it with no problems on my iPhone5. I tried using TextEdit and OpenOffice. Thanks!

    I'm having trouble opening a word document on my new Macbook Pro. I opened it with no problems on my iPhone5. I tried using TextEdit and OpenOffice. Thanks!

    I open Word documents on my Mac using Pages and textedit without any problems.
    I also have a copy of OpenOffice and it can also open Word documents without any problems.
    Could you please provide more details on exactly what you mean when you say you having troubles opening Word documents? What kind of troubles?
    Allan

  • How can I transfer text and format from a Word Doc to a new Pages Doc?

    How can I transfer text and format from a Word Doc to a new Pages Doc?

    Select, and Copy in the Word doc and Paste in the Pages doc. It may not be perfect. Importing (Opening) the Word doc is probably better than using Copy/Paste for large amounts of content.
    Jerry

  • Integration General new ledger and SAP orgmanagement

    Hello,
    as desribed in
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/42/f8f25eba761a7de10000000a422035/content.htm
    there is a possibility to integrate object from the new general ledger into SAP HR.
    In my case it is not enough to integrate those obect in IT0001, far better would be an deep integration in sap orgmanagement (like the cost center in om IT1001)
    Does anyone knows a way to integrate this areas?
    Best regards
    GeKa

    Hi Udo Werner
    Thanks for your answer, now is clear that is not any integration between New Ledger and Matereial ledger, even that, I would like to know, what do you mean when you said u201CThe only integration topics might be how to handle the postings of material ledger within the accounting interfaceu201D?, is any transaction related ?
    Thanks in advance,
    Best regards,
    Sergio

  • Real Time COFI Integration in NEW GL

    Hi ,
    can any one tell me the logic for "Real Time COFI Integration" in NEW GL
    I am getting the error " Activate company code check in controlling area'
    thanks
    Gopi krishna

    hi,
    hi please check the  Blog at the below link .This will solve your problem.
    /people/sivaprasad.r/blog/2008/12/12/new-gl-company-code-validation-vs-real-time-cofi-integration-what-is-the-relation
    thanks
    satish

  • Problem in copy 2 WORD files to a new WORD file

    Hi
    I have a problem in copy 2 WORD files to a new WORD file -
    i.e. the text of the new WORD file suppose to be composed from the text of the 2 original WORD files.
    Unfotunately I get a new WORD file which i can't open, or a file which contains strange simbols in it.
    So far i succeded in copy one WORD file to a new WORD file , using - FileOutputStream and FileInputStream, the code is:
    import java.io.*;
    public class IOStreamDemo {
    public static void main(String[] args)throws IOException {
    InputStream in2 = new FileInputStream("fruit.doc");
    OutputStream out2 = new FileOutputStream("dst2.doc");
    // Transfer bytes from in2 to dst
    byte[] buf2 = new byte[1024];
    int len2;
    while ((len2 = in2.read(buf2)) > 0) {
    out2.write(buf2, 0, len2);
    in2.close();
    out2.close();
    Does sombody know how to do it properly?
    Thanks

    dear friend
    I just create two word file one is fruit.doc and other
    is dst2.doc
    after that i write some lines in fruit.doc
    then I just execute your code.
    after that I open dst2.doc
    then I found it as exact copy of fruit.doc
    I doesn't get any junk text.
    Your code is working absolutely fine.No it is not. Add som styling, headers, index etc to the docuements, and then try to run the code. It's not possible to just append two word documents. You have to parse the files and read relevant information, and then create a new valid document with that information.
    /Kaj

  • Do I have to Replace Every Word doc with a New Pages doc?

    Everytime I open an old Word document (I now use Pages exclusively) in Pages, I have to re-save the document as a Pages document. The old Word file stays on my computer, as I'm creating something new, a Pages document. I now am left with two files: the old Word file, and the new Pages file. Is there some sort of "batch" operation, a way to convert ALL my word files on my HD into Pages files?
    Or (more realistically) is there a way to have Pages automatically REPLACE the Word file with the new Pages file, so that I'm left with 1 new file, not 1 old and 1 new.
    Thanks a lot,
    Lee

    The difference between the two files is that one's extension is .doc and the other's is .pages. So, for the Pages document to replace the Word document, it's name would need to be "Testdoc.doc" instead of "Testdoc.pages" as it would normally save. This may cause problems in the future since .doc isn't a Pages document, so that wouldn't be something you'd want to do for documents you intend to keep.
    It seems that Automator would be a good choice for this, but I don't know enough about Automator to be able to say if it can be done or how to do it.

  • Word will not save new files or open ones recieved in ichat

    Word will not save new files or open ones recieved in ichat
    i have had this problem before and had to take my computer to the apl store were someone at the genius bar fixed it by deleting some preferences thing i do not remember how who did it or how he got to that file and need help to fix this problem

    Try Finder>Library>Preferences>Microsoft>com.microsoft.word.prefs.plist, and delete that last one.
    I don't know that it will solve your problem, but I'm pretty sure that's what the guy did before. Good luck!

  • Integration of New graph type in OBI application

    HI,
    We have a requirement where in client is interested to add a new type of graph into the OBI Application. No details of the graph type yet.
    Can you please let me know the feasibility  and the steps involved in integrating a new graph type in the OBI application.
    Thanks,
    Kiran

    Dear Christian
    Can you please let me know the meaning of SWF?
    Anyway, I would use "Transaction Launcher" customizing to display a URL in crm ui framework.
    Regards
    Bhavishya

  • Microsoft Office Pro plus 2013 installation wizard pops up everytime I open a Word document or a new page.

    Microsoft Office Pro plus 2013 installation wizard pops up everytime I open a Word document or a new page.  I realize that other people have the same problem.  However no answer has been found to stop this problem.  I wonder if there is a
    way.  Hope someone is able to tell me and the others.

    Hi,
    By the installation wizard, do you mean the First Run screen? If yes, please follow the steps below to disable it:
    STEP ONE: If you have not already, download the Office 2013 Administrative Template files. These can be downloaded from
    http://www.microsoft.com/en-us/download/details.aspx?id=35554
    STEP TWO: Copy the ADMX files to %systemroot%\PolicyDefinitions and the ADML files to the language specific folder (such as en-us) under %systemroot%\PolicyDefinitions.
    STEP THREE: Using the Group Policy Management Editor go to User Configuration | Administrative Templates | Microsoft Office 2013 | First Run |
    STEP FOUR: Set the Disable First Run Movie to Enabled and the Disable Office First Run on application boot to Enabled
    Please check the result then.
    Regards,
    Melon Chen
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs. Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Can anyone recommend a document word processing App for new ipad?

    Can anyone recommend an App for word processing for the new ipad?  I was hoping to be able to use the dictation function to save some time.  Cloudon, evernote...anything better?

    There are word processing apps such as Apple's Pages and from third-parties apps such as Documents To Go and QuickOffice Pro HD.

  • Interaction between Excel and Word OLE

    I am using Office 2007 to write procedures but a problem is apparent only when run on Office 2013.
    A procedure in a workbook that records Sales information runs to transfer data to another workbook that stores Invoice information, and then opens Word to generate a mail merge document from a template (dotm) which has an event procedure (on Open) to merge
    data from the Invoice spreadsheet into a document to produce an invoice.  This procedure works without problem on the Office 2007 (Vista) machine and until recently likewise ran without problem on the Office 2013 (Windows 8.1) machine.  However,
    apparently following an automatic update to the Office 2013 machine, when the Word document is generated the procedure "hangs" at the point of reading the data from the Invoice workbook, and after a longish delay a message is generated along the
    lines of the program awaiting an OLE action.  The only way to stop the whole process is via task manager.
    After much research I have found that on the Office 2013 machine, the mail merge of data from the Invoice workbook will not now work if the Invoice workbook is open, bot works OK if it is closed.
    I have therefore programmatically closed the Invoice workbook, and the procedure now works on the Office 2013 machine (and on the Office 2007 machine).  However, I would like the Invoice workbook to be open when the Word document has been generated. 
    I therefore inserted a few seconds wait into the procedure to allow the mail merge to be completed, then tried to reopen the Invoice workbook.  I now get the message that the Invoice workbook is locked for editing, and asking if I want to open a read
    only copy (which I don't).  The Invoice workbook does not appear on the task bar, nor does it appear in task manager.  I have tried code to make it active and I then get "subscript out of range", and I have tried code to make it visible
    and I again get "subscript out of range".  However, if I close down the word documents generated with the data from the Invoice workbook, I can then open it;  presumably the merge process is treated as still being in progress while the
    documents are open, and the Invoice workbook is "released" when the documents are closed.
    Has anyone any advice to offer on how to deal with this problem of not being able to open the Invoice workbook while the mail merge documents are open.  The problem is apparent in both Office 2007 and 2013.

    Hi Caillen
    Thanks for looking at this.  I should explain that I do all my work on an Office 2007 machine for a family member who lives elsewhere, so I don't have direct access to the Office 2013 machine.  However, they are reasonably computer literate and
    report faults accurately.  To deal with your queries:
    1.  Their Office (and Windows) updates are installed automatically.  Basically, their systems are kept up to date.  It is only a guess that an update may have caused the problem, for the procedure worked as expected for some months and no
    other changes have been made.  The problem does not occur on my Office 2007 machine.
    2.  For the initial problem there was no error message initially;  the little circle just kept going round for a minute or so, then a message appeared on the Office 2013 machine saying that Excel was waiting for another program to complete an OLE
    action.  That message no longer appears because I have cured the problem by closing the workbook that is the data source for the mail merge.
    3.  I do indeed mean VBA code by procedure (Sub xxx()).  The code in the Word Template on which the procedure originally hung up was the third line below - i,e, the line starting ActiveDocument.MailMerge.OpenDataSource Name:= _
    Sub ctPrintInvoice()
        ActiveDocument.MailMerge.MainDocumentType = wdFormLetters
        ActiveDocument.MailMerge.OpenDataSource Name:= _
            ThisDocument.Path & "\ColTarInvoices.xlsm", _
            LinkToSource:=True, _
            Revert:=False, _
            Format:=wdOpenFormatAuto, Connection:="DETAILS", _
            SQLStatement:="SELECT * FROM `'Print Invoice$'`", SQLStatement1:=""
    "DETAILS" is a named range within the workbook that is the data source for the mail merge.  "Print Invoice" is the name of the worksheet that holds the data.  This code runs as an event on opening the document, which is done
    automatically within the code in the workbook.  The code in the Sales workbook to open the document is:
        Set objWord = CreateObject("Word.Application")
        If strSourceSheet = "Sales" Then
            Set objctMergeDoc = objWord.Documents.Add(ThisWorkbook.Path & "\ctInvoice1.dotm")
        ElseIf strSourceSheet = "Euro Sales" Then
            Set objctMergeDoc = objWord.Documents.Add(ThisWorkbook.Path & "\ctEuroInvoice1.dotm")
        End If
        objWord.Visible = True
        Set objWord = Nothing
        Set objctMergeDoc = Nothing
    However, the procedure also hung in the same place on the Office 2013 machine if the document was opened manually.
    4.  The code in the Sales workbook to close the Invoice workbook is:
       Workbooks("ColTarInvoices.xlsm").Close
    The code to reopen it is:
       Workbooks.Open (ThisWorkbook.Path & "\ColtarInvoices.xlsm")
    This generates the message that the workbook is locked for editing.  The same message is generated if I try to open the workbook manually while the merged documents are still open.
    (The files are all in the same folder)
    With thanks
    Andy C

Maybe you are looking for