Using OLE for download MS-Word

Hello,
can I use a MS-Word Template while creating an word obejct to write on the template
I mean here-->
CREATE OBJECT gs_word 'WORD.APPLICATION'.             "Create word object
Thank you

Hi,
Chek out this wiki page:
[Sample program to create a Word document from ABAP (using OLE) |http://wiki.sdn.sap.com/wiki/display/Snippets/SampleprogramtocreateaWorddocumentfromABAP%28usingOLE%29]
Regards

Similar Messages

  • HT5787 i buy iphone 4sfrom some friend that's he got it from his friend in canada and me set up software for it from Itunes and it asking now for apple ID that's i don't used it for download apps and me can't open my Iphone right now !! what i should do ?

    i buy iphone 4sfrom some friend that's he got it from his friend in canada and me set up software for it from Itunes and it asking now for apple ID that's i don't used it for download apps and me can't open my Iphone right now !! what i should do ?

    It's not stolen ,that iphone came from canada to Egypt and me activeted it last night i got the acc from the owner
    Thanks for Replay Mr

  • I created an Apple ID but i can't able to use it for downloading applications from iTunes store on my 4s iPhone

    I have created an apple id on my 4S iPhone. But i can not able to use it for downloading applications from iTunes store on my phone

    can your computer?
    can your browser ?
    what error does it give you?

  • Export for Web using optimized for "download" or "streaming"?

    Hi,
    Exporting for Web have some setting there,i'll choosing the .mov - H264 - and medium low quality - 15 Frame Rate - Checked Frame Reordering, others Automatic and the Audio will be 32.000hz and Mono.
    Now,what about the optimizing? Download or Streaming?
    What about Self-Contained Movie? do i need it?

    optimizing for download or streaming depends on what sort of site you're sharing it on. Will it be streamed or a download file?
    It must be self-contained, unless you are going to be streaming it, and hosting it from the machine that the original media is on. Even then I'm not sure that would work reliably.

  • Photos not available for downloading to word.  Photo booth comes up instead

    I downloaded an update to my iMac today and now I can's access my photos for Word.  Photo Booth comes up instead.

    Thank you Dah.Veed, but when working in Word it doesn't allow me to choose the Photo app in the Apps folder.  I put a newsletter together every month and now I can't add any photos to it.  Very frustrating!

  • How to create a hyperlink for download a word file

    Hi,
    In a html page, I would like to provide a hyperlink which points to the word document "myword.doc".
    However this does not work as the brother considers the file as a html text and does not open it with MS word.
    Any help?
    Thanks
    Py

    It doesn't think it's html, unless the server tells the browser the content type is text/html, and I highly doubt that, unless you are not linking to the file directly, but linking to a JSP page or servlet which is actually returning the file. In which case, set the content type for the response to the proper type for the file.

  • [solved]use aria2c for downloader in pacman

    hello
    I sort my mirrorlist by reflector & now the first three of them are ftp & I don't now how can I use aria2c?
    whould you help me?
    Last edited by MHALAH152 (2013-05-21 15:07:26)

    Wiki's commmand:
    XferCommand = /usr/bin/aria2c --allow-overwrite=true -c --file-allocation=none --log-level=error -m2 --max-connection-per-server=2 --max-file-not-found=5 --min-split-size=5M --no-conf --remote-time=true --summary-interval=60 -t5 -d / -o %o %u
    OP's command:
    XferCommand = /usr/bin/aria2c --allow-overwrite=true -c --file-allocation=none --log-level=error -x16 --max-file-not-found=5 -k1M --no-conf -R=true --summary-interval=60 -t5 -d / -o %o %u/
    If the OP would have just looked in the wiki then, this whole thread could have been avoided.  I suspect that he/she just copy and pasted it before anyway, which is why I suggested reading the man page to figure out what was actually being opted for.

  • Dump while running a program with OLE Excel download facility in ITS

    Hi,
    Because of some complex requirment, I had created a report program which will download the data to an Excel sheet using SAP OLE Automation Controller. For this report i had created a tcode too.
    The report which i developed is perfectly working fine in SAPGUI. But if i access the same report throught SAP ITS serice. I am getting a dump. Please find below the dump details. I am not able to figure it out why the dump is not coming in SAPGUI.
    Runtime Errors         MESSAGE_TYPE_X
    Date and Time          09.03.2010 05:35:41
    Short text
    The current application triggered a termination with a short dump.
    What happened?
    The current application program detected a situation which really
    should not occur. Therefore, a termination with a short dump was
    triggered on purpose by the key word MESSAGE (type X).
    |
    Error analysis
    Short text of error message:
    Control Framework : Error processing control
    Long text of error message:
    Diagnosis
    An error occurred when the system tried to process the commands
    from the Automation Queue on the presentation server.
    There are several possible reasons for this:
    - The installation of the SAP GUI on the presentation server is
    faulty or obsolete.
    - There is an error in the application program
    - There is an error in the SAPGUI or an integrated control
    Procedure
    1. Make sure that you have imported the appropriate Support
    Package, the current kernel, and GUI patch for the release of your
    system
    2. Check whether the error occurs locally on one or a few PCs, or
    generally on all PCs. Note whether the error only occurs for some
    users, for example because of a specific Customizing setting.
    If it only occurs locally, this suggests an installation problem
    with the PC. Check the installation; if necessary, reinstall the
    software. In the dump, search for the SY-MSGLI field, since it may
    point to the cause of the error.
    3. Activate the Automation Trace (in accordance with SAP Note
    158985).
    4.Start the transaction and continue until the screen immediately
    before the dump.
    5. From the System -> Utilities menu, choose Autom. Queue,
    Synchronous Processing.
    The status bar of the GUI displays the text:
    "Automation synchron flush mode on"
    6. If you now proceed with the application, the short dump will
    display the ABAP call that caused the error; the Automation Trace
    will contain the error on the presentation server.
    7. If necessary, load the short dump and trace files on to
    sapservX, so that SAP can analyze them.
    Technical information about the message:
    Message class....... "CNDP"
    Number.............. 006
    Variable 1.......... " "
    Variable 2.......... " "
    Variable 3.......... " "
    Variable 4.......... " "
    How to correct the error
    Probably the only way to eliminate the error is to correct the program.
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "MESSAGE_TYPE_X" " "
    "SAPLOLEA" or "LOLEAU02"
    "AC_SYSTEM_FLUSH"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    User and Transaction
    Client.............. 120
    User................ "XXXXXX"
    Language Key........ "E"
    Transaction......... "ZGA_BEACON_SOX_RPT "
    Transactions ID..... "4B95E2560EB62F9AE10000000A241C33"
    Program............. "SAPLOLEA"
    Screen.............. "ZGA_REP_BEACON_SOX_REPORT 9000"
    Screen Line......... 0
    Information on Caller ofr "HTTP" Connection:
    Plug-in Type.......... "HTTP"
    Caller IP............. "10.36.28.52"
    Caller Port........... 8000
    Universal Resource Id. "/sap/bc/gui/sap/its/webgui/~flNUQVRFPTIzNzIxLjAxNC4wNC4
    wNA=="

    Hi All,
    FYI.....
    As I said because of my complex requirement, i am using OLE excel download facilities to download the data. ITS wont support this OLE download facility.  This can be done only through local SAP GUI.
    The reason for this is that, when i am using this download facility through SAP GUI, OLE object thats used in my report program will directly talk to the Local OLE excel objects (i.e. the local installed Excell application) and download the data. But if it's through ITS, my program wont be able to communicate with the local excel OLE objects because of this i am getting a DUMP.
    Thank You all for the support. All the best in future. 
    Regards
    Maneesh Chandran

  • OLE for transfer data to excel

    Hi
    Can any one send me the coding to use ole for sending data from a multirecord form to excel?
    I have never used OLE.
    i am using DDE package for this task but its very slow.
    regards,
    adeel

    Hi Adeel
    Here's some code to dump the contents of a block into Excel. You may want to uncomment the commented-out sections if you want the functionality of being able to save the workbook that gets created. (I copied it a while back from this forum, so am not claiming any credit for it, or for the lack of readability!!)
    Best regards
    Andrew
    PROCEDURE pr_Forms_to_Excel(p_block_name IN VARCHAR2 DEFAULT NAME_IN('system.current_block')) IS
    -- Declare the OLE objects
    application OLE2.OBJ_TYPE;
    workbooks OLE2.OBJ_TYPE;
    workbook OLE2.OBJ_TYPE;
    worksheets OLE2.OBJ_TYPE;
    worksheet OLE2.OBJ_TYPE;
    cell OLE2.OBJ_TYPE;
    range OLE2.OBJ_TYPE;
    range_col OLE2.OBJ_TYPE;
    -- Declare handles to OLE argument lists
    args OLE2.LIST_TYPE;
    -- Declare form and block items
    form_name VARCHAR2(100);
    f_block VARCHAR2(100);
    l_block VARCHAR2(100);
    f_item VARCHAR2(100);
    l_item VARCHAR2(100);
    cur_block VARCHAR2(100) := NAME_IN('system.current_block');
    cur_item VARCHAR2(100) := NAME_IN('system.current_item');
    cur_record VARCHAR2(100) := NAME_IN('system.cursor_record');
    item_name VARCHAR2(100);
    baslik VARCHAR2(100);
    row_n NUMBER;
    col_n NUMBER;
    filename VARCHAR2(100);
    BEGIN
    -- Start Excel
    application:=OLE2.CREATE_OBJ('Excel.Application');
    OLE2.SET_PROPERTY(application, 'Visible', 'True');
    -- Return object handle to the Workbooks collection
    workbooks:=OLE2.GET_OBJ_PROPERTY(application, 'Workbooks');
    -- Add a new Workbook object to the Workbooks collection
    workbook:=OLE2.GET_OBJ_PROPERTY(workbooks,'Add');
    -- Return object handle to the Worksheets collection for the Workbook
    worksheets:=OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
    -- Get the first Worksheet in the Worksheets collection
    -- worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Add');
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 1);
    worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Item',args);
    OLE2.DESTROY_ARGLIST(args);
    -- Return object handle to cell A1 on the new Worksheet
    go_block(p_block_name);
    baslik := get_block_property(p_block_name,FIRST_ITEM);
    f_item := p_block_name||'.'||get_block_property(p_block_name,FIRST_ITEM);
    l_item := p_block_name||'.'||get_block_property(p_block_name,LAST_ITEM);
    first_record;
    LOOP
    item_name := f_item;
    row_n := NAME_IN('SYSTEM.CURSOR_RECORD');
    col_n := 1;
    LOOP
    IF get_item_property(item_name,ITEM_TYPE)<>'BUTTON' AND
    get_item_property(item_name,VISIBLE)='TRUE'
    THEN
    -- Set first row with the item names
    IF row_n=1 THEN
    baslik:=NVL(get_item_property(item_name,PROMPT_TEXT),baslik);
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, row_n);
    OLE2.ADD_ARG(args, col_n);
    cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.SET_PROPERTY(cell, 'Value', baslik);
    OLE2.RELEASE_OBJ(cell);
    END IF;
    -- Set other rows with the item values
    args:=OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, row_n+1);
    OLE2.ADD_ARG(args, col_n);
    cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
    OLE2.DESTROY_ARGLIST(args);
    IF get_item_property(item_name,DATATYPE)<>'NUMBER' THEN
    OLE2.SET_PROPERTY(cell, 'NumberFormat', '@');
    END IF;
    OLE2.SET_PROPERTY(cell, 'Value', name_in(item_name));
    OLE2.RELEASE_OBJ(cell);
    END IF;
    IF item_name = l_item THEN
    exit;
    END IF;
    baslik := get_item_property(item_name,NEXTITEM);
    item_name := p_block_name||'.'||get_item_property(item_name,NEXTITEM);
    col_n := col_n + 1;
    END LOOP;
    EXIT WHEN NAME_IN('system.last_record') = 'TRUE';
    NEXT_RECORD;
    END LOOP;
    -- Autofit columns
    range := OLE2.GET_OBJ_PROPERTY( worksheet,'UsedRange');
    range_col := OLE2.GET_OBJ_PROPERTY( range,'Columns');
    OLE2.INVOKE( range_col,'AutoFit' );
    OLE2.RELEASE_OBJ( range );
    OLE2.RELEASE_OBJ( range_col );
    -- Get filename and path
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG( args, p_block_name );
    OLE2.ADD_ARG( args,'Excel Workbooks (*.xls, *.xls');
    filename := OLE2.INVOKE_CHAR( application,'GetSaveAsFilename',args );
    OLE2.DESTROY_ARGLIST( args );
    -- Save as worksheet
    IF NVL(filename,'0')<>'0' THEN
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG( args,filename );
    OLE2.INVOKE( worksheet,'SaveAs',args );
    OLE2.DESTROY_ARGLIST( args );
    END IF;
    -- Close workbook
    --OLE2.INVOKE( workbook ,'Close');
    -- Release the OLE objects
    OLE2.RELEASE_OBJ(worksheet);
    OLE2.RELEASE_OBJ(worksheets);
    OLE2.RELEASE_OBJ(workbook);
    OLE2.RELEASE_OBJ(workbooks);
    --OLE2.INVOKE(application, 'Quit');
    OLE2.RELEASE_OBJ(application);
    -- Focus to the original location
    go_block(cur_block);
    go_record(cur_record);
    go_item(cur_block||'.'||cur_item);
    END;

  • Teach me use OLE2 to change a WORD doc. content, Urgent?

    Where can I have enougt infomation teach me how to use OLE2 statements to control a Word doc. so that I can change the content of a Word template before store into Oralce database.
    Anybody can teach me....Urgent!

    I am sorry, but we can't teach you OLE on this forum. WebUtil allows you to use OLE to integrate with Word and we do have an example on OTN that explains how to access and modify a Word document using WebUtil (http://www.oracle.com/technology/products/forms/htdocs/webutil/Webutil_demo.zip) but it doesn't explain how OLE works.
    Frank

  • Download to MS WORD using OLE

    Hi All,
    I am developing a program to download data to MS WORD using OLE.  I would like to know answers for my below questions,
    1) What is the equivalent ABAP code for VB macro
         Selection.Style = ActiveDocument.Styles("No Spacing")
         Issue is when i say new line it prints one blank line and then start printing. This is because of format Style = Normal.
         If i set it up as No Spacing it would resolve my issue.
    2) How to insert a bitmap image in MS WORD using OLE?
    Thanks in advance.

    Found answer by myself.
    Below is the code to add picture
    GET PROPERTY OF selection 'InlineShapes' = shapes.
    CALL METHOD OF shapes 'AddPicture'
      EXPORTING
      #1 = 'C:\Temp\untitled.bmp'
      #2 = 0
      #3 = 1.
    Below is the code for no line spacing
    SET PROPERTY OF parformat 'SpaceAfter' = 0.

  • Techniques needed for Automated (OLE) PDF Creation from Word using Adobe 9

    My client currently uses Adobe 5, PDF Writer, Word and OLE automation to generate PDF files.  This is done on a server. A queue of Word documents are read. A watermark is added via a VB Macro. Then, also via a macro (below) a pdf file version of the Word doc  is generated. The pdf file is generated as temp.pdf, which the program uniquely renames later. 
    Unfortunately, Adobe 5 and PDF Writer cannot handle Chinese characters and now needs to.  Seems like the process  above cannot be the same with Adobe 9. How should I approach this server driven, pdf file generation from Word docs with Adobe 9? This is a 24 x 7 ongoing, 100s of documents a day process. It isn’t clear to me that PDF Writer is still an option.  With Adobe 9 installed on a client, it is possible to save a Chinese character Word document using the Adobe ‘Convert to PDF’ toolbar button
    Sub WritePdfFile()
        Windows(1).Activate
        ActivePrinter = "Acrobat PDFWriter"
        Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
            wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
            Collate:=True, Background:=True, PrintToFile:=False
    End Sub

    I think that type of question would go in
    Scripting http://forums.adobe.com/community/acrobat/acrobat_scripting 
    or
    SDK http://forums.adobe.com/community/acrobat/acrobat_sdk
    Or, for Microsoft parts of the process, search at
    http://search.microsoft.com/search.aspx?mkt=en-US&setlang=en-US

  • Using Forms OLE builtin to access word spell check

    I am trying to find a way to utilize the Forms OLE built in for using MS Word spell check. We are upgrading our forms from 6 to 10g. In version 6 we were able to use OLE to open word and use it to pass in our string we wanted spell checked.
    Is there a similiar feature in forms 10g?

    Jim,
    the Forms9i demos have a PJC solution that does spell checking (http://download.oracle.com/otn/other/general/forms9iDemos9_0_0_1.zip). The Forms 10g version of the demo is not yet avaiable but will be soon. If time is short, then you can make the 9i sources work in Forms 10g with no extra work required.
    A viewlet demo can be accessed through the following link
    http://otn.oracle.com/sample_code/products/forms/demo/9i/javabeans_pjc_samples/spellcheck/viewlet/pjc_jspell_viewlet.html
    Frank

  • This is a bit of information for folks that use Robohelp for Word.

    I know this is all a day late and a follar short but for those folks that still use Robohelp for Word:
    If your company is going to Windows 7, X5 will not work.  You need to bump it up to at least RH8.
    Even after you upgrade, if you use the tripane (winhelp_2000) view in RH for Word, it will not work on Windows 7 even with the microsoft patch.  With the patch it will look like an older version of RH in winhelp_4.  At least I have not been able to get it to display.
    What will work is if you compile it in Webhelp.  You will loose some links.  I know I should be moving to Robhelp Html and I tried, but when I did that I got a lot of garbage at the top of all my topics, I lost all my external links and I would have to retrain my partner...
    Now about links.  My only complaint about Robohelp for Word was it's limited external linking capacity.  If you use RH for Word you know you can only brouse to the net or to an htm or html document.  It doesn't mean you can't link to a PDF or an excel spread sheet.  You just can't brouse to it.  You can manually enter the path.  I just changed 740+ htm links to pdf links (pdf in same file as htm and the names were the same except for extension) and it worked.  If you intend to try this back up.
    Anyway, if this helps anyone great..if not thanks for letting me babble.  I like my Robohelp for Word in Webhelp format.
    Peggy Theo.

    Thanks for posting this Peggy.
    It is worth adding that there is another way of continuing to work with Word - using Linked Documents in RoboHelp HTML. You create Word documents entirely independent of RoboHelp and then create topics by linking those documents in a RoboHelp HTML project.
    You cannot create WinHelp that way but WinHelp is on life support and requires users to download a viewer, you cannot distribute it. It really is time to move on from WinHelp.
    RoboHelp for Word is not getting much development and does not get the new features being added to RoboHelp HTML.
    Linking is covered on my site.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Using OLE add Header to MS Word Document in ABAP Program

    Dear Friends,
    I have a requirement where I want to add Header and Footer to MS Word through OLE in ABAP Program
    I am able to open the word document, through OLE,
    I am stuck @ the following step.
    CALL METHOD OF LO_APPLICATION 'ActiveDocument' = LO_DOCUMENT.
      IF SY-SUBRC <> 0.     EXIT.   ENDIF.
      CALL METHOD OF LO_DOCUMENT 'Sections' = LO_SECTIONS.
      IF SY-SUBRC <> 0.     EXIT.   ENDIF.
    Please let me know.
    Thanks
    Rajesh

    Hi Rajesh,
    You have to use GET PROPERTY & SET PROPERTY  attributes of OLE2_OBJECT to use headers.
    Just a sample code snippet for your reference :-
    DATA : GS_TABLE TYPE OLE2_OBJECT ,
          GS_RANGE TYPE OLE2_OBJECT,
         GS_CELLTYPE OLE2_OBJECT,
    CALL METHOD OF GS_TABLE  'Cell' = gs_cell
       EXPORTING #1 = '1'
                         #2 = '1'.
       GET PROPERTY OF gs_cell 'Range' = gs_range.
       SET PROPERTY OF gs_range 'Text' = 'VGUID'.
       CALL METHOD OF gs_table 'Cell' = gs_cell
       EXPORTING #1 = '1'
                         #2 = '2'.
    For more details search on SCN for code on creating MS word document using OLE automation.
    Regards
    Abhii

Maybe you are looking for

  • ITunes library on one computer - Play sound on another?

    I'm needing to free up space on my MBPro and thought I'd move my library to my wife's MB since she has more hard drive space available. Then I thought I'd delete the library from my machine to free up that 20-25GB of space. The only problem with that

  • Robo v9 Show/Hide without Twisties - One button no longer working

    Hey there, as stated I am using Robo v9 with Show/Hide without Twisties (One button) with javascipts.  We have most of our images using DHTML drop-downs and when folks click on "Show All Images" on the page, the GIF changes to "Hide All Images" and a

  • Fireworks(OSX) font issue

    So i use dafont.com and download lots of font. But it seems that only a few of them actually show up in firework's font list after i have had them installed. heres what i have done. -installed in fontbook under 'Computer' -restarted my computer and f

  • Parallel execution of scenario

    Hi, I'm trying to run a scenario (Say A) by passing different project variables simultaneously or in parallel. I'm invoking these executions from command line. Scenario A -> Variable X =1 Scenario A -> Variable X=2 The scenario loads data from a tabl

  • Installation error -  LiveCycle Enterprise Suite 4 - Designer DEMO

    Hi, I've downloaded the demo version of Adobe LiveCycle Enterprise Suite 4 - Designer and it's asking for a serial? Is this normal, where do I get a serial to run my demo version? Cheers, Veronica