How to treat Office 2007 attachments?

Hello,
I read in an eml file (with the help of javamail 1.4) and want to detach/dump all the containing attachments to disk.
This works fine for a lot of attachment types but unfortunately not for Office 2007 documents (e.g. docx, pptx).
Enclosed the source sequence to store a InputStream content into a specific object (rEmail):
BufferedInputStream tBufIs = null;
try {
tBufIs = new BufferedInputStream(((BASE64DecoderStream) aObject));
} catch (ClassCastException tEx) {
  InputStream tIs = (InputStream)aObject;
  tBufIs = new BufferedInputStream(tIs);
int x = tBufIs.available();
rEmail.setContent(new byte[x]);
tBufIs.read(rEmail.getContent(), 0, x);As already mentioned this works great for a lot of attachments. If I dump these byte content to disk with the FileOutputStream object all the attachements are fine and readable.
Enclosed the relevant message header content of the incoming message (eml file) which contains the office 2007 attachment:
MIME-Version: 1.0
Content-Type: application/octet-stream;
     name="P6_TF06_1Seitedoc_2007_nach_pdf.docx"
Content-Transfer-Encoding: base64
Content-Description: P6_TF06_1Seitedoc_2007_nach_pdf.docx
Content-Disposition: attachment;
     filename="P6_TF06_1Seitedoc_2007_nach_pdf.docx"
Content-class: urn:content-classes:message
X-MimeOLE: Produced By Microsoft Exchange V6.5
X-OriginalArrivalTime: 19 Aug 2008 15:24:54.0732 (UTC) FILETIME=[BB5318C0:01C9020F]
Subject: Test 1 DOCx
Date: Tue, 19 Aug 2008 17:24:54 +0200
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
Thread-Topic: Test 1 DOCxOk, the source really dumps the office 2007 attachment (like docx, xlsx etc.) to disk (with FileOutputStream tOs.write(rEmail.getContent()); but unfortunately it is unreadable.
Is there something I have to consider?
Any help would be appreciate.
Thanks in advance and regards
Bodo Stockschlaeder

[http://java.sun.com/products/javamail/FAQ.html#readattach|http://java.sun.com/products/javamail/FAQ.html#readattach]

Similar Messages

  • Office 2007 Attachments giving dump"Buffer table not up to date" in SOCO

    Hi SRM Experts,
    We have came across a strange issue. DOCX & XLSX doc type attachments are giving a dump " Buffer Table not up to the date" when the Buyer in SOCO press the button "Add to the work area".
    This is coming only when there is some SPECIAL CHARACTER used in the description of the attachment e.g. _, -, . / etc etc.
    The other attachment types are working fine. i.e. PDF or Doc with NO special characters used in the description are giving NO errors t
    IS there any special OSS note for this?
    I have already configured all the config settings in DC10, DC20 & DC 30.
    Please help us out in this.
    Regards,
    Varun.

    Hi Muthu,
    Thanks for the help.. But here the problem is not with extension only.
    The problem is if there is a special character in the attachment description in Office 2007 doc types like XLSX, DOCX then and then only it is giving dump.
    I tested without special characters in description with DOCX file it is working fine.
    Please help out as this is becoming serious issue now.
    Regards,
    Varun

  • Office 2007 attachments getting corrupted in PO Print Program

    HI SRM Experts,
    We are having SRM 5.0 Classic Scenario and EHP 4.0 ECC 6.0, we have a customized PO Print Program which after PO approval send notification to vendor & requestor of cart with the attachments.
    We are facing problem that when requester attaches MS 2007 attachments(having 4 characters as extension) it is converting these into default 3 character extension and thus they get corrupted. I have already made settings in DMS (DC30).
    Can anyone please help here to know if any SAP note is there for the same as I feel that we cannot change the ABAP program/code mentioned in standard Function module. Here is my finding after the debugging:
    The Function module 'CV120_KPRO_MASTER_DATA_GET' is responsible for returning the document type.
    It is returning the extension in field dappl of table ptx_data which is of type CHAR3.
    So it is not accepting the extension of CHAR4.
    Regards,
    Varun

    Hi
    Analyse the Dump in ST22 transaction
    difficult to say , as what was changed in the program is not known exactly
    from the dump you have to know
    Regards
    Anji

  • How to install Office 2007 on MacBook?????

    I have purchased Office 2007 for my Mac. However, when I put the CD in, the only thing that happens is that the icon appears on the desktop. The CD does not run automatically as it does with a PC. I have opened up the icon for Office 2007, but when I click on the setup icon, still nothing happens.
    I am new to Mac and I have to have Office installed for school purposes. Any help would be greatly appreciated.

    I was told by an Apple Rep. that Office 07 was compatible with Mac, but did not specify that I needed Office for Mac.
    Maybe the rep just assumed you knew that PC software doesn't run on Mac's. In any case, MacOffice 08 is to be released Jan. 15.
    http://www.macoffice2008.com/#ex_fg

  • HT4759 How to Completely Uninstall iCloud? Office 2007 Save As Crashes

    I can no longer use "Save As" in Office 2007 since I enabled ICloud.  Word and Excel Crash. And Outlook does not seem to be about to send more than one email at a time.  I have to select the Send/Receive button right after I create a new email.  If I wait and create a second email, the first email in the outbox changes status from ready to send to cannot send.  And even if I open it and try to send it, it will not send.  I have to re-create it. 
    I want to know how to thoroughly uninstall ICloud.  Other posters on Microsoft (Girish M) and Apple (SkinnyNick) have indicated that the problem is related to ICloud.  And I can confirm that I started having problems right after enabling ICloud.  Here are the references:
    http://answers.microsoft.com/en-us/office/forum/office_2007-excel/excel-2007-clo sing-unexpectedly-when-trying-to/69705682-06ca-4e39-b17e-56d4bacc3452
    https://discussions.apple.com/thread/4607859?start=0&tstart=0
    I spent a lot of time trying to trouble shoot this problem.  I ran the Office install to repair.  This did not work.  I uninstalled all Office 2007 related products.  I then manually purged all directories relating to office including the Common Shared Directories.  Then, I ran Microsoft's FixIt to uninstall Office to make sure everything was uninstalled.  Then, I reinstalled Office 2007 and it still failed.  I thought about installing Office 2010, but the second post (above SkinnyNick) indicates that this would not work.
    So, I am looking for a way to uninstall iCloud including that parts that is causing this problem.  Now, the second post (above) from
    SkinnyNick) says that he tried to uninstall iCloud but this did not fix the problem.  He finally reconfigured iCloud by de-selecting Outlook, but I would rather completely remove iCloud. 
    Can anyone provide instructions on how to completely remove iCloud so that my Office 2007 products will function again using Save As?
    Thanks,
    Rob

    As a Windows Application Developer who has more than 28 years of professional development experience, I can tell you that anything is possible in terms of how developers implement their applications. I have seen just about everything under the sun, and it would not surprise me if Apple's iCloud not only places files in key Windows directories, but it may use configuration information in a file as opposed to the Window Registry to control how their application behaves. And this would prevent “System Restore" from fixing the problem. Configuration information can be stored in many places. And, even if you do use the Windows Registry to control how your application works, you can key off of new files (like a user profile file) to control how your application to behaves. Csound1, you have been very generous with your time, and I am very grateful for your advice. Thank you.

  • How to Open DOC in Office 2003 and DOCX on Office 2007 automatcally when both installed on same pc

    How to Open .DOC file in Office 2003 and .DOCX on Office 2007 automatcally when both office 2003 and 2007 are installed on same pc
    When tried with open with files automatically open in 2007.

    Presumably you've confirmed that both copies of Word are working alongside each other, and if you right click on a document you see both options listed in the Open With menu?
    If so the first thing to try is to right click on a .doc file, go to the Open With menu and then click "Choose default program". If both versions of Word are listed then simply choose Word 2003, ensuring the option to always use this choice is selected.
    If you find that both options are listed as "Microsoft Word" with no version number, or only one is listed, then select the more options entry and then at the bottom of the list select to find another app on the PC. You can then navigate to the Word 2003 executable
    and select it that way.
    Alternatively, search in the start menu for "associations" and you'll find an option to change the file type associated with a file extension. Open that and you'll get a list of every extension known to Windows, and within that you'll find .doc and .docx
    listed, and you can change which application each is associated to.

  • How to add web page in office button of ms office 2007 using c#?

    I want to add web page in office button in ms office 2007 using c#. How to add it? ribbon menu button should be in office button. when i click menu the web page should display in menu itself. tell me the solution.

    Hello,
    You can't place anything in the Ribbon UI (aka Fluent UI), only the predefined set of controls according to the Ribbon XML scheme. Read more about the Fluent UI in the following series of articles in MSDN:
    Customizing the 2007 Office Fluent Ribbon for Developers (Part 1 of 3)
    Customizing the 2007 Office Fluent Ribbon for Developers (Part 2 of 3)
    Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)
    Consider opening a web browser in a child window (separate) or using a task pane for that.

  • Switching to MAC from Windows: How to open files in Office 2007  VMFusion?

    Dear all,
    Intro:
    I switched to MAC and now cannot find the solution to a simple problem.
    First: I need an Office 2007 PowerPoint FULLY compatible solution.
    What did not work: IWork, NeoOffice, Office 2008 (this is not fully compatible with Office 2007 Files)
    I also had problems with: Parallels (not stable, too many hangups), codeweaver crossover (office files do not even open sometimes, good idea but not suitable for serious office jobs)
    Now I have VMWare Fusion with WinXP and Office 2007 as this seems to be the only truly stable and best solution to run Office 2007 on Mac
    Question:
    How to open files in Office 2007 on MAC VMWare Fusion easily?
    It would be nice to spotlight the file and click and it opens in powerpoint or excel or word 2007 in Virtual Machine.
    The only known solution to me is to use the Windows explorer to navigate to the file and then open it from Fusion WinXP. This is very cumbersome and honestly makes me think of getting back to a windows machine as I work with office frequently.
    Thank you for your help.

    Thank you for the quick reply.
    Yes, I have Office 2007 installed. The problem is that to open files in Fusion virtual machine I have to use the windows explorer and navigate to the file to open it. Now that I have the mac I want to use the good feature of spotlight. So when I search and find the file I want to open I cannot click on it on the mac (or in finder) but I have to switch back to the virtual machine, locate the file again and open it from windows.
    You might think - ok, why not skip the first step of using spotlight, and look up the file in windows explorer before anything else?
    Correct, but I know from parallels that there is a file association possible to directly access the file in office 2007.
    This does not seem possible in Fusion - So the question is whether there is a possibility on the mac to associate the file and to click on it in finder/spotlight and the office 2007 application in fusion opens the file. So far I could not find anything.
    Thanks

  • How to connect XLSX(MS Office 2007 Excel file) in java

    i successfully connected ms office 2003 *.xls* file with the help of JXL library
    can any one tell me how can i connect XLSX (MS Office 2007 Excel file) in java.

    http://www.smartxls.com/indexj.htm is commercial library (not free) also a poor documentation
    can you give me a sample code of reading and writing xlsx file
    http://poi.apache.org/spreadsheet/index.html free library.
    but sample code are difficult to understand .
    if you have a good and simple example code please give me OR any other reffrences

  • Openning a Link from MS Office OneNote 2007 launches MS Internet Explorer althoug FireFox is my default Internet browser. Any idea how to cause OneNote 2007 to Launch FireFox instead?

    Openning a Link from MS Office OneNote 2007 launches MS Internet Explorer althoug FireFox is my default Internet browser. Any idea how to cause OneNote 2007 to Launch FireFox instead?

    Below is how it is being done.  This worked perfectly for years. MS Office 2007 does complain that the file extension does not match the data format (it's a tab delimited text file but I'm pretending it's an Excel file so they'll be prompted to view it as a spreadsheet in Excel) but you just click open and it works fine.  This issue with IE is new.  Let me know if you have any more ideas.
    <CFSETTING ENABLECFOUTPUTONLY="Yes" SHOWDEBUGOUTPUT="No">
    <!--- variables used for separating cells with tabs, and for new rows --->
    <CFSET tabchar=chr(9)>
    <CFSET newline=chr(13) & chr(10)>
    <!--- tell browser it's an Excel file --->
    <CFCONTENT TYPE="application/vnd.ms-excel">
    <!--- tell Internet Explorer to open as Excel file --->
    <CFHEADER NAME="Content-Disposition" VALUE="filename=myfile.xls">
    <!--- get data --->
    <CFQUERY NAME="getinfo" DATASOURCE="mydsn">
        select fieldone, fieldtwo
        from mytable
    </CFQUERY>
    <!--- output column headings --->
    <CFOUTPUT><CFLOOP INDEX="q" LIST="fieldone,fieldtwo">#q##tabchar#</CFLOOP>#newline#</CFOUTPUT>
    <!--- output database records --->
    <CFOUTPUT QUERY="getinfo">#getinfo.fieldone##tabchar##getinfo.fieldtwo##newline#</CFOUTPUT>

  • How to add Microsoft Office 2007 Lang Pack

    Hi guys,
    One of my customer wants me to add Office 2007 Lang Pack to MDT 2013. As a newbie, I would like to know how to do it please ?
    Thank you for your help.
    Cheers,

    Hi guys,
    One of my customer wants me to add Office 2007 Lang Pack to MDT 2013. As a newbie, I would like to know how to do it please ?
    Thank you for your help.
    Cheers,
    Some guidance is here:
    http://technet.microsoft.com/en-us/library/dd162397(v=office.12).aspx
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • I have to use microsoft office 2007 and 2003 for windows and I'm using a macbook pro, How i can get the on mac?

    I have to use microsoft office 2007 and 2003 for windows and I'm using a macbook pro, How i can get the on mac?

    You can either use Office for Mac 2011 or use Boot Camp to run Windows or use a VM, such as Parallels Desktop to run Windows. Running Windows, you'd be able to use MS Office for Windows.
    Clinton

  • How to integrate MS Office 2007 including outlook 2007 with SAP B1 2005B

    dear all,
    I am using SAP B1 2005B version. I want to integrate it with MS office 2007. Also outlook 2007 must also be integrated along with excel, word etc as I do outlook integration also.
    can any one tell me how to make this happen...
    please help me..
    thanks and regards,
    Yeshwanth

    dear Gordon,
    Is there any way to use excel 2007, outlook 2007, word 2007 in 2005B version.
    At present we are using 2003 version of MS office along with SAP B1 2005B.
    for example if we have excel 2007 in the system where we install SAP B1, it is saying as microsoft excel not found.
    how can we solve this..
    reg,
    Yeshwanth

  • How to uninstall MS office 2007 if i already loaded office 2011?

    I have a new macbook pro retinal display. both MS office 2007 band 2011 are loaded, as I migrated the old computer on to this. I am trying to uninstall 2007, but the uninstall feature does not need to work. how can I do this? thanks

    You needed to uninstall this old Office first. It is not a Mac version. You cannot run the Windows uninstaller. So, see the following. Of course not all will work exactly on the Mac as on a Windows box, but you can try to hunt down everythat that belongs to the Windows version and toss it. You can start by locating a Windows folder for Office in your Applications folder and removing it.
    Uninstalling Software: The Basics
    Most OS X applications are completely self-contained "packages" that can be uninstalled by simply dragging the application to the Trash.  Applications may create preference files that are stored in the /Home/Library/Preferences/ folder.  Although they do nothing once you delete the associated application, they do take up some disk space.  If you want you can look for them in the above location and delete them, too.
    Some applications may install an uninstaller program that can be used to remove the application.  In some cases the uninstaller may be part of the application's installer, and is invoked by clicking on a Customize button that will appear during the install process.
    Some applications may install components in the /Home/Library/Applications Support/ folder.  You can also check there to see if the application has created a folder.  You can also delete the folder that's in the Applications Support folder.  Again, they don't do anything but take up disk space once the application is trashed.
    Some applications may install a startupitem or a Log In item.  Startupitems are usually installed in the /Library/StartupItems/ folder and less often in the /Home/Library/StartupItems/ folder.  Log In Items are set in the Accounts preferences.  Open System Preferences, click on the Accounts icon, then click on the LogIn Items tab.  Locate the item in the list for the application you want to remove and click on the "-" button to delete it from the list.
    Some software use startup daemons or agents that are a new feature of the OS.  Look for them in /Library/LaunchAgents/ and /Library/LaunchDaemons/ or in /Home/Library/LaunchAgents/.
    If an application installs any other files the best way to track them down is to do a Finder search using the application name or the developer name as the search term.  Unfortunately Spotlight will not look in certain folders by default.  You can modify Spotlight's behavior or use a third-party search utility, EasyFind, instead.
    Some applications install a receipt in the /Library/Receipts/ folder.  Usually with the same name as the program or the developer.  The item generally has a ".pkg" extension.  Be sure you also delete this item as some programs use it to determine if it's already installed.
    There are many utilities that can uninstall applications.  Here is a selection:
        1. AppZapper 2.0.1
        2. AppDelete 3.2.6
        3. Automaton 1.50
        4. Hazel
        5. AppCleaner 2.1.0
        6. CleanApp
        7. iTrash 1.8.2
        8. Amnesia
        9. Uninstaller 1.15.1
      10. Spring Cleaning 11.0.1
    For more information visit The XLab FAQs and read the FAQ on removing software.

  • How to automatcally uninstall Office 2007 32 bit for installation of Office 2010 64 bit

    I have an MSP that will automatically install my companies 64 bit version of Office 2010 provided Office 2007 32 bit is already uninstalled. However, the option to uninstall previous versions of Office does not work in the MSP. We have Office 2007 32 bit
    currently installed and whenever I run the MSP I receive the following: "Setup Error You cannot install the 64 bit version of the Office 2010 because you have 32 bit Office products installed."
    Is there a way to automatically remove Office 2007 using the MSP or some other method? Thanks.
    Wedgies

    What are you creating your MSP with?  I'm thinking that because you're calling the Office 64bit setup routine, that one of the first checks it does before it even processes your config.xml file is to check for previous versions installed, and it hits
    the 32bit wall and stops.  What you should probably do is create a package that has two routines in it.  First process the uninstall of Office 2007 32bit, and once that's done process the Office 64 bit installation.  You could do this with a
    package created by Installshield or Wise and some logic to process Step 1 (Remove Office 32bit) and then upon success of that process Step 2 (Office 64bit Install).
    On a different note...is there a business requirement that you have for the 64Bit version of office?  If not...I don't think this is all worth the headache, unless you specifically need umpteen million rows of data in Excel, and the machines you're
    deploying on have more than 4GB of RAM....just my opinion...
    Also, I'm not sure this is a volume activation question though you might get more responses from the Setup and Deployment forum
    http://social.technet.microsoft.com/Forums/en-US/officesetupdeploy/threads
    Hope this helps,
    r/
    john
    John Wildes | Senior Enterprise Architect | United Airlines | Desktop Engineering

Maybe you are looking for