Download Word .doc file saved in MIME Repository to local PC

I need to store a static Word document on the SAP server and download to the user's browser via a BSP application.  I have found code in the IT00 BSP Application to download the Word doc in xstring form to the browser, which will work for what I'm doing.  What I cannot seem to find, however, is how to retrieve the  Word .doc file stored in the MIME repository and then subsequently how to convert this MIME object to an xstring value.  Is there a class or function module available to retrieve and convert the MIME object to an xstring form so that it can be returned as a response back to the browser?

you can use the following code snippet to read mime repository content.
data: o_mr_api type ref to if_mr_api.
if o_mr_api is initial.
o_mr_api = cl_mime_repository_api=>if_mr_api~get_api( ).
endif.
call method o_mr_api->get
exporting
i_url = l_url
importing
e_is_folder = is_folder
e_content = l_current
e_loio = l_loio
exceptions
parameter_missing = 1
error_occured = 2
not_found = 3
permission_failure = 4
others = 5.
l_current will hold the image in a XSTRING var
Regards
Raja

Similar Messages

  • Capturing the output of a jsp page and save that output in a WORD .doc file

    Hi,
    This is Naveen. I got stuck up with a problem/doubt. URGENT ! URGENT !
    My doubt is how to capture the output of a jsp page(the content is dynamic generated) and save that output to a MS-Word doc file.
    I know that therez an option of using Servlets Filters, but this concept is supported by Servlet 2.3 spec. and not earlier. And we are working on previous spec. and our web-servers also supports the prev. version and not the 2.3 version.
    If incase, therez a third-party utility for free usage, suggestions are appreciated.
    Hope most of them came across this kind of functional requirement. If anyone of them succeeded in this, please express ur bitter experience if any, faced during the coding.
    Thanks in Advance for help.
    Naveen

    You can set the MIME content type as .doc and try to open the Page.
    res.setContentType("application/vnd.ms-excel"); to generate the Page output as Excel
    res.setContentType("application/vnd.ms-word"); to generate the Page output as MS Word doc
    Hope this helps..

  • How to convert Ms Word (.doc) file to Protected pdf

    Hi all,
    Is anybody out there could help me on how to convert Ms Word (.doc) file to protected pdf file using java? May be there are some jar file I need to download or any tools you used before? Thanks in advance... =)

    Hi all,
    Is anybody out there could help me on how to convert
    Ms Word (.doc) file to protected pdf file using java?
    May be there are some jar file I need to download or
    any tools you used before? Thanks in advance... =)Hi All,
    Thanks for your replies..I think i almost find the solution. I found 2 options to do this. They are :
    1. Get Adobe Acrobat and it's SDK (has to buy)
    2. Get OpenOffice 2.0.4 and it's SDK (opensource)
    So, i do option 2. I install them in my system.then i call them from my ide. Then i follow the code from this link..
    http://weblogs.java.net/blog/tchangu/archive/2005/12/open_office_jav_1.html
    Thanx.. =)

  • When I download word docs my MacBook is adding the flv extension onto the doc extension and I can't open the doc. Any ideas?

    When I download word docs my MacBook is adding the flv extension onto the doc extension and I can't open the doc. Any ideas?

    Go to the main Library folder and look for a folder called Application Support / Microsoft.
    There are a few folders in there, and you may have to do some digging. In one of them (mine is called MAU2.0), there should be a file called Microsoft Autoupdate. Open it.
    It looks like this:
    check the button for manual updates.
    That should let you open the apps without triggering an automatic update.

  • How to open and read pdf and micrsoft word (.doc) files or documents

    My problem is how to use my BB 9800 software version 6.0.0.546 to read/view pdf files and microsoft office documents. I have also bought documents to go from online and have installed it on my phone, but whenever i try to open it I receive a message that it is incompactible. Any help will be greatly appreciated.

    Hi, Sammy.
    Why not install a 3rd party PDF reader and Word Doc reader to help open and read pdf and micrsoft word (.doc) files or documents? You can google it and select one whose way of processing is simple and fast to help you with the related converting work.  It will be better if it is totally manual and can be customized by users according to our own favors. Remember to check its free trial package first if possible. I hope you success. Good luck.
    Best regards,
    Arron

  • How to create pdf from word doc file

    HI
    I have a word doc file. (not docx). I have adobe 8 pro. I wrote a word script to create the file using the distiller. The fonts in the pdf file it makes look wacky. That script looks liek this:
    * create archive pdf file
    lfilename = "t:\cardeals\pdf\pdf_archive\" + PADL(alltrim(STR(month(date()))),2,"0") + PADL(alltrim(STR(DAY(DATE()))),2,"0") + SUBSTR(ALLTRIM(STR(YEAR(DATE()))),3,2) + "1.pdf"
    oWord = createOBJECT("Word.Application")
    oWord.DisplayAlerts = .f.
    oWord.documents.open('t:\cardeals\cardeals.doc')
    oword.ActivePrinter = "\\CSSSERVERONE\Overflow"
    oword.application.printout(,,,,,,,4,,,,,,,,,,,)
    oWord.PrintOut(.F.,.F.,,"c:\output.ps",,,,,,.F.)
    oPDF = CREATEOBJECT ( "PDFDistiller.PDFDistiller.1" )
    oPDF.FileToPDF("c:\output.ps", "&lfilename.", "High Quality" )
    oWord.application.quit
    release oword
    I also wrote a script to attempt to print it from the Adobe printer. It seems to work, but when I go to open the created pdf file it I get the following message:
    Acrobat could not open mypdf.pdf because it is either not a supported file type or because the file has been damaged.
    The code was this:
      Set oWordApp = CreateObject("Word.Application")
        Set oDocument = CreateObject("Word.Document")
        oWordApp.Visible = True
        oWordApp.Application.WindowState = wdWindowStateMinimize
        Set oDocument = oWordApp.Documents.Open("t:\cardeals\cardeals.doc")
        strOutputPDFName = "c:\mypdf.pdf"
        holdprtrdefault = oWordApp.ActivePrinter
        oWordApp.ActivePrinter = "Adobe PDF"
        oWordApp.Application.PrintOut FileName:="t:\cardeals\cardeals.doc", _
            Copies:=1, _
            Range:=wdPrintAllDocument, _
            Item:=wdPrintDocumentContent, _
            Pages:="", _
            PageType:=wdPrintAllPages, _
            Collate:=True, _
            Background:=False, _
            PrinttoFile:=False, _
            OutputFileName:=strOutputPDFName
    If I clkick on the PDFMaker icon iside word, the resultant file is BEAUTIFUL. Can I automate this from within word? If not, does PDFMaker have a command line utility that I could put in a batch file?

    I don't have an answer, but you might get a better response in the scripting forum.

  • How to associate 1997-2003 Word doc files with Word 2010?

    Hi
    I am surprised not to be able to find out how to associate word 1997-2003 Word files with Wrod 2010. The object is to have Word 2010 open the document when I click on the document. Many of my Word 1997-2003 documents were created using Word 2010.
    When I try to use the associations function in Windows 7 I cannot find the Word program. Checking "Properties" on the Word Icon leads to a program called "CVH.EXE" which does nothing when I try to open doc files with it.
    Thank you.
    David
    lifeform23

    Hi,
    From your description , I understand that you want to open the prior Word doc files  in Word 2010.
    You can refer to the KB article that resolve this issue:
    How to open and save Word, Excel, and PowerPoint 2007 or 2010 files in earlier versions of Office programs
    http://support.microsoft.com/kb/924074
    Sincerely,
    Harry 

  • Can't download word docs or PDF's from Google Docs

    I cannot download word docs or pdf's from Google docs.  I can download MP3's.
    I get an error message saying IE can't find the website.
    The google docs forum response to this problem was to uninstall the current version of Flash and install Flash 10.1  I'd like to try this suggestion but don't know how to implement the procudure or where to find Flash 10.1 and choose which version of it to install
    What is the best way to do that?
    I currently have Flash Player 10.3.181.14 installed
    I use IE Ver 8.0.6001.1870
    And Windows XP pro version 5.1.2600 SP 3 Build 2600
    Thanks in advance for any help you can offer

    I cannot quite understand how Google Docs is related to Flash Player.  But anyway, to revert to an earlier Flash Player version
    downoad the FP uninstaller from http://kb2.adobe.com/cps/141/tn_14157.html and save it to disk;
    download the archived FP 10.1 installers from http://kb2.adobe.com/cps/142/tn_14266.html and save it to disk;
    close all browser instances, then run the downloaded uninstaller;
    extract the latest 10.1 installer (ActiveX for IE, plugin for other browsers) and run it.
    Don't hesitate to ask again if my instructions are not clear.

  • How to load word .doc-files into java applications?

    Hi,
    I want to load a word .doc-file (or any other type of document) into a java application, as part of the application.
    Is there any java special library to do it?
    Any solution or hint?
    Thank you.

    No, there is no existing Java library to do it that I am aware of. You could write your own, however, as the Word 97 binary file format is published. I am not sure that the Word 2000, or XP formats are as well, but since they put out the 97 presumably they'd do the same with the rest -- although I am suprised that Micro$$$oft even published the 97 format.
    A library such as this would take quite some time write, due to the extensive format, but here's a link to a copy of it just so you can see what it'd take: http://www.redbrick.dcu.ie/~bob/Tech/wword8.html
    Also keep in mind that Micro$$$oft has never remained binary compatable between versions. In short, this means that you'd have to parse each version's documents differently. Not a fun task.
    If a Java library to read Micro$$$oft file formats already does exist, I'm willing to bet that it costs $$$ mucho dinero $$$.
    Hey, aren't proprietary file formats just wonderful?

  • Need to copy text in e mail and paste to seperate word doc file

    Previous to Firefox 4 I could highlight text in body of e mail, select Edit and drop down to copy then minimize screen and select Word Doc file, then paste and print text.
    Please advise, Coyote Deb

    You have the orange Firefox button?
    You can call up the classic menu bar ''temporarily'' by tapping the Alt key or pressing F10. To display the classic menu bar all the time, choose
    View > Toolbars > Menu Bar
    That will replace the orange Firefox button.
    Also, you should be able to copy by right-clicking on the selected text and choosing Copy from the pop-up menu. Could be quicker in some cases.

  • CR10 Exported MS word doc file not print out

    My application (CR10, VB6, Oracle10.2) exports MS word doc file to disk, But when I try to print out, not print out at some printer and print out legal size (8.5x14) at some printer. It set up as Letter (8.5x11) I think in CR, page footer is wrong place. How I can change page footer location to move up in the report?
    one more thing...
    When I try to open this MS doc file, always prompt pop up and ask "You want to convert to RTF?" I don't understand.
    Thank you.

    Sachiko,
    You might want to try exporting to MS Word from within the Crystal Reports Deisgner and see if you get the same behaviour. If it appears correctly from the Designer then it would suggest an issue with the coding in your application and the issue would be better answered in the BO SDK Application Development forums.
    I think the footer is in the wrong place due to the incorrect paper size and don't believe that any formatting of the report itself will correct it.

  • Will not show headers of word doc files

    I format Word doc files into pdf files to print paperback books. I set the files up with headers and footers. When I am finished I do a print preview and both the headers and footers show up fine but when I convert to pdf the headers aren't there. I am assuming that this is a configuration issue but can't figure out how to fix it. Any suggestions? I would appreciate some help??

    I am using Word 2007.  I create the header by clicking on headers and footers and filling out the information. I know that I am getting the header in there securely because when I do a print preview it shows up just fine. It just doesn’t travel over to the pdf version. (though the footers make it just fine) I go to Acrobat, click on the create pdf version button and I get a nice pdf version (minus the header)
    Thank you for responding. I hope you can help!
    Linda
    PawPrints POD

  • How do I get the ability to convert my word .doc file to flashpaper?

    How do I get the ability to convert my word .doc file to
    flashpaper?
    I had cs3 installed but I just installed MS word 2007 and the
    ability to export to flashpaper is not available that I can see.
    Do I have to reinstall contribute in order for it to install
    the flashpaper exporter to word?
    -Line

    If I understand you correctly, you need to Scale and Position each clip.  These are part of the inherent Motion effect attached to every clip, found in the Effects Control Panel.

  • I cannot download the doc files which I have uploaded to Dropbox. I am using Microsoft Works in Windows 7.

    I cannot download the doc files which I have uploaded to Dropbox. I am using Microsoft Works in Windows 7.
    I am trying to download them to my ipad.

    You need Dropbox on your iPad. Open the document in Dropbox on iPad, and using the icon on the far right (down arrow) Open In ...

  • Can someone please upload the original downloads stack .doc file that comes default with a clean install?

    Can someone please upload the Downloads Stack.doc file to somewhere for me to download? The document detailing how the downloads stack works. I deleted it by accident hoping to free up space but figured out that the dowloads stack now looks horrible without it. So, can someone please upload it? Thanks. The document with the green down arrow that comes with your mac when you clean install the OS. I don't exactly want to clean install Mountain Lion just for the document so... yeah.

    It is not a doc file, but a pdf.
    Here it is for you. I'll leave it up for 24 hours, or until you indicate you have it (whichever comes first).
    www.steamgenie.com/About Downloads.pdf

Maybe you are looking for