Extracting embedded files

Hello,
I am working on Project where I want to identify and save the embedded files of Microsoft Office File type which are embedded in Word Document. I can identify and save the Word File which is an embedded object in Word Document but can not save PowerPoint and Excel files. Can anyone help me out????
I am pasting here the sample code which works for embedded Word Files ...
if(embededFile.toLowerCase().startsWith("word")){
com.word.OLEFormat wordOle=(com.word.OLEFormat)inlineshape.getOLEForm at();
wordOle.doVerb(new Integer(WdOLEVerb.wdOLEVerbOpen));
System.out.println(wordOle.getIconLabel());
Application app = wordOle.getApplication();
document1 = app.getActiveDocument();
System.out.println(document1.getFullName());
document1.saveAs("D:\\Development\\Embeded_Files\\ Embeded\\"+wordOle.getIconLabel()+".doc", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);
document1.close(new Boolean(true),null, null);
how about PowerPoint and Excel files??

The MARS Agent supports only 64 Bit OS as per
KB3015072

Similar Messages

  • Extracting Embedded Files From a PDF with Adobe.APS

    I'm not sure if this needs to be here in security or if it needs to be in another forum, so if an admin feels it needs to move to a different forum, feel free to.
    The situation I am in is that I get about 100-150 pdf's a day that I need to extract an embeeded file from.  Right now this is a completely manual process and is very time consuming.  What I have been trying to do is automate the process of extraction.
    The issue I am running into is that the files are encrypted with Adobe.APS, and so my java code won't handle the security, and I can't find any other software that handles Adobe.APS.
    I was wondering if Adobe had a product that could do this, or if there was an API that could handle this.  I can perform the extraction on a platform of any flavor (Windows, Mac, Linux, etc...).
    Any help in this regard would be greatly appreciatted.  Thanks.

    In my case I have a drop-down list of files with preloaded filenames to attach. Here is the code that works for me on a click of button.
    var selectFileName = form1.subform.DropDownList1.rawValue;
    if (selectFileName != "Please Select") {
    var doc = event.target;
    doc.importDataObject(selectFileName);
    var MyPar1 = doc.getDataObject(selectFileName);
    var filename = MyPar1.path;
    After you click the button it open a windows dialog box asking you to choose the file and adds the attachment to the attachment pane in runtime. To view the attachments simply view the attachment pane in runtime after you add the attachments.
    Good luck,
    SekharN

  • Extract All Embedded Files in All Folders and Save Each? Copy/Paste from PDF to Word?

    I have most of what I need here, but I’m missing 2 important pieces. 
    #1)  I want to copy/paste from all PDF files in a folder and paste the copied data into a single Word file. 
    It works fine if I have ONLY Word docs in my folder.  When I have PDF files and Word files, the contents of the Word files are copied in fine, but the contents of the PDF files seem to come in as Chinese, and there is no Chinese in
    the PDF, so I have no idea where that’s coming from.
    #2)  I want to extract all embedded files (in all my Word files) and save the extracted/opened file into the folder.  Some embedded files are PDFs and some are Excel files.
    Here the code that I’m working with now.
    Sub Foo()
    Dim i As Long
    Dim MyName As String, MyPath As String
    Application.ScreenUpdating = False
    Documents.Add
    MyPath = "C:\Users\001\Desktop\Test\" ' <= change this as necessary
    MyName = Dir$(MyPath & "*.*") ' not *.* if you just want doc files
    On Error Resume Next
    Do While MyName <> ""
    If InStr(MyName, "~") = 0 Then
    Selection.InsertFile _
    FileName:="""" & MyPath & MyName & """", _
    ConfirmConversions:=False, Link:=False, _
    Attachment:=False
    Dim Myshape As InlineShape
    Dim IndexCount As Integer
    IndexCount = 1
    For Each Myshape In ActiveDocument.InlineShapes
    If Myshape.AlternativeText = PDFname Then
    ActiveDocument.InlineShapes(IndexCount).OLEFormat.Activate
    End If
    IndexCount = IndexCount + 1
    Next
    Selection.InsertBreak Type:=wdPageBreak
    End If
    On Error Resume Next
    Debug.Print MyName
    MyName = Dir ' gets the next doc file in the directory
    Loop
    End Sub
    If this has to be done using 2 Macros, that’s fine. 
    If I can do it in 1, that’s great too.
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Hi ryguy72,
    >>When I have PDF files and Word files, the contents of the Word files are copied in fine, but the contents of the PDF files seem to come in as Chinese, and there is no Chinese in the PDF, so I have no idea where that’s coming from.<<
    Based on the code, you were insert the file via the code Selection.InsertFile. I am trying to reproduce this issue however failed. I suggest that you insert the PDF file manually to see whether this issue relative to the specific file. You can insert PDF
    file via Insert->Text->Object->Text from file.
    If this issue also could reproduced manually, I would suggest that you reopen a new thread in forum to narrow down whether this issue relative to the specific PDF file or Word application.
    >> I want to extract all embedded files (in all my Word files) and save the extracted/opened file into the folder.  Some embedded files are PDFs and some are Excel files.<<
    We can save the embedded spreadsheet via Excel object model. Here is an example that check the whether the inlineshape is an embedded workbook and save it to the disk for you reference:
    If Application.ActiveDocument.InlineShapes(1).OLEFormat.ClassType = "Excel.Sheet.12" Then
    Application.ActiveDocument.InlineShapes(1).OLEFormat.DoVerb xlPrimary
    Application.ActiveDocument.InlineShapes(1).OLEFormat.Object.SaveAs "C:\workbook1.xlsx"
    Application.ActiveDocument.InlineShapes(1).OLEFormat.Object.Close
    End If
    And since the Word object model doesn't provide API to save the embedded PDF, I would suggest that you get more effective response from PDF support forum to see whether it supports automation. If yes, we can export the PDF as embedded spreadsheet like code
    absolve.
    Hope it is helpful.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • DNG converter fails to extract embedded .cr2 raw files

    I just tried to extract embedded raw files from 889 raw files from a Canon 5D3 having been converted by the DNG converter 6.7 beta - the DNG converter only succeeded with extracting three of them. I also tried with the 6.6 stable version with the same result.
    If DNG converter can't easily retrieve the embedded raw files then I think this "feature" should be left out - it's misleading people into taking unwanted risks when you're better off just keeping the originals (it's a bit more messy to organise and archive two sets of files, but I'd rather do that than having to mess around with this)
    So stay away from this "feature" unless you want to paint yourself into a corner.

    Download and test the most recent version (final GM) of DNG Converter 6.7 and retest...might also be useful to provide a bit more info such as OS & CPU...and also whether or not the DNGs behave normally in ACR or LR. Basic troubleshooting info to test or duplicate your findings would be useful (required) before you can honestly be making such "blanket" statements about DNG Converter...

  • Extracting Mp3 files in a word document

    Since I have a MacBook Pro, thought this was the forum to ask the question.  I use Word for Mac.  Just received a word document with embedded mp3 files.  I have no idea how to extract the files or export them to iTunes, maybe? Want to listen to them.  Can't click and drag, won't work.  Any help much appreciated.

    I understand your solution, but the trouble is - well, maybe I don't understand, there is no enable: all applications.
    In other words, within the cell of the Word D, there is the Mp3 file.  If I click with the control, I only get the box that says: cut, past, copy, unknown object, save as picture, format object, etc. etc. It's basically instructions from the Word document, not instructions from Mac.  Am I making sense?
    Thanks

  • InDesign asking for location of embedded files

    I embedded two links in an InDesign document before I sent them to another designer, so I would only have to send one file and not 3. However, the designer called to say InDesign was asking him to locate the embedded files or something, and he couldn't work with the document. Does anyone know why InDesign would ask to locate the files even though they've been embedded?

    I didn't have any problems when I saved the file to another folder and reopened it from there. I'm sure I didn't copy/paste the files - they were originally linked, before i right-clicked on them in the links panel and chose 'embed file'. The icons beside the files in the links panel indicate that the files are embedded. I also checked my sent emails and opened the file that I had sent them, which had the files embedded and not linked.
    I still don't know why this happened - maybe the other designers were trying to unembed the files and didn't understand the message that pops up when you attempt to do so... but even then you can choose to extract the embedded files from the InDesign doc to a specified location; you don't have to link to the originals.
    Thanks for everyone's help, though. I ended up getting around the issue by just zipping the files.

  • Extract embedded xml from PDF/A-3b (also creation)

    Hello there,
    in the context of a research project, we are currently trying to extract embedded xml from a PDF/A-3b document via code.
    The project deals with establishing a new invoicing standard (Zugferd: ferd-net.de, only german). Invoices are expressed via xml, which is embedded in PDF/A.
    What we are trying to archive is extraction of the xml via java code. For testing purposes, we are currently using an third party skd to extract the invoice-xml, by calling a .EXE file and then picking up the results in java.
    I currently have only one valid example file that can be processed via this sdk. To get more data, i used the test version of acrobat pro to alter the embedded xml file. To be more specific, i deleted the embedded file, added a new xml file, and used preflight to make the PDF conform to /A-3b. Although the file seems to have the same properties as the original, it can no more be processed via the extraction sdk. Since messing around with acrobat does not seem to get me anywhere, i am now looking into extracting data from the pdf my self.
    Is there any present implementation/library/solution for extracting data in a java context? The few third party tools i found are all based of a .net/windows native environment. I have heard rumors about Adobe giving out tools to extract embedded data from PDF/A?
    How is it the other way around? Is it possible to embedd xml into a PDF via Java? Given there allready is PDF file which we can attach to.
    I really appreciate reading and thanks for any help or input!
    Greetings,
    Florian

    Hi Florian,
    I would look for general purpose PDF libraries that can open a PDF and access data objects in it.
    All in all it is not too difficult to get to the embedded XML, once you have a library that can access and read data structures/data objects inside a PDF file. Some understanding of the inner workings of PDF data structures will help you get the job done (e.g. read the section about embedded files in the PDF standard / ISO 32000-1, as well as the chapter about PDF syntax).
    Olaf
    Am 19 Aug 2013 um 13:19 schrieb xfrapp <[email protected]>:
    Extract embedded xml from PDF/A-3b (also creation)
    created by xfrapp in PDF Language and Specifications - View the full discussion
    Hello there,
    in the context of a research project, we are currently trying to extract embedded xml from a PDF/A-3b document via code.
    The project deals with establishing a new invoicing standard (Zugferd: ferd-net.de, only german). Invoices are expressed via xml, which is embedded in PDF/A.
    What we are trying to archive is extraction of the xml via java code. For testing purposes, we are currently using an third party skd to extract the invoice-xml, by calling a .EXE file and then picking up the results in java.
    I currently have only one valid example file that can be processed via this sdk. To get more data, i used the test version of acrobat pro to alter the embedded xml file. To be more specific, i deleted the embedded file, added a new xml file, and used preflight to make the PDF conform to /A-3b. Although the file seems to have the same properties as the original, it can no more be processed via the extraction sdk. Since messing around with acrobat does not seem to get me anywhere, i am now looking into extracting data from the pdf my self.
    Is there any present implementation/library/solution for extracting data in a java context? The few third party tools i found are all based of a .net/windows native environment. I have heard rumors about Adobe giving out tools to extract embedded data from PDF/A?
    How is it the other way around? Is it possible to embedd xml into a PDF via Java? Given there allready is PDF file which we can attach to.
    I really appreciate reading and thanks for any help or input!
    Greetings,
    Florian
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5606424#5606424
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5606424#5606424
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5606424#5606424. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in PDF Language and Specifications by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.
    Olaf Druemmer | Managing Director | callas software GmbH | Schoenhauser Allee 6/7 | 10119 Berlin
    Tel +49.30.4439031-0 | Fax +49.30.4416402 | [email protected] | www.callassoftware.com
    Amtsgericht Charlottenburg, HRB 59615 | Geschäftsführung: Olaf Drümmer, Ulrich Frotscher

  • Extracting embedded graphics

    I've inherited a bunch of FrameMaker files where all the graphics were embedded in the document rather than imported by reference. When I right click on a graphic and select Object Properties, of course it says, "Referenced File: No File."
    Is there any way I can do some sort of global redirect to have them all go to a graphics folder to reference the graphic rather than embedding them? Or am I just hosed?
    Since I don't know the file names, I'd have to hunt through the gazillion graphics folders until I found the right graphics to re-import (by reference, of course) -- in a 300 page document! GAH!
    Here's what I've tried: running a List Of...References, a List of Figures, Bruce Foster's Archive, swearing at the previous people who did this (and who aren't here anymore) -- all to no avail!
    Any help and/or advice (other than "turn around and run as fast as you can...") would be greatly appreciated.
    Anne

    "Extracting embeded graphics" for jpg, gif, .. and eps is one of the wonderful features of TOOLBOX for FrameMaker.
    Now, TOOLBOX for FrameMaker 7.0, 7.1, 7.2, 8.0, 9.0 download is available again: www.toolboxforme.com/downloads
    There are order forms: For US only, GErmany and other countries: http://www.squidds.de/en/products/price-lists.html
    Please fill it out.  If you need the previous TOOLBOX release (6, 7, 8), then please write a note in the field note.
    -- George

  • Extracting .xls file from an FTP site

    Hi there,
    I'm trying to run a DI solution that is extracting a file from a FTP site. DI can see the file but it gives me an error saying that:
    FTP could not transfer file <FTP site/myfile.xls> from host <IP Address>: <>. Please ensure that the FTP relative path for the SAP R/3 working directory is set correctly such that the data file is accessible to the FTP
    Can someone please help with this.
    Thank you.
    Gsecure

    Hi,
    thats SP1 for DS XI 3.2
    I think there is no delta from XI 3.2 to XO 3.2 SP1 what means you have to do a fresh install and upgrade repo.
    But you better doublecheck before but i think there is no delta.
    Regards
    -Seb.

  • Error this object is corrupt or is no longer available while trying to open a embedded files in word 2007 or 2013

    Hi All
    Word 2007 and 2013 always show this error
    This object is corrupt or is no longer available while clicking a embedded files( like pdf, doc and xls). I tried reinstall office 2007, and office 2013. But still have same problems.
    I surf internet, find out solution like turnning  off the add-on,  but not working for me, and I do not install Norton AntiVirus.
    Does anyone know what the solution of this issue is, I do not have any idea right now.
    Thanks in advance!!!!!

    I notice there is a cross post on Answer Forum:
    http://answers.microsoft.com/en-us/office/forum/office_2013_release-word/error-the-object-is-corrupt-or-is-no-longer/fde2160e-fc19-4f90-81db-4f569fac7b95
    Is Dinel's suggestion helpful?
    Tony Chen
    TechNet Community Support

  • Error while extracting XML file from the application server

    Hi ,
    I am writing a XML file into the application server, after which when i try to extract the file to the local server using the report - RFASLDPC ,
    the file is extracted, but with a '#' symbol at the first position.
    Because of which the XML File does not open. But after i open the file in notepad and manually delete the '#' symbol and then reopen the file, it works fine.
    Is there any way to remove the '#' symbol while extracting itself ??
    Thanks in advance,
    Vikas.

    Select the option "No Character Set Conversion" in stead of Code page 1100.
    However, I still have troubles -> the downloaded xml file misses a space on several places. This causes errors too.

  • Error while extracting zip file

    I am using the following code to extract zip files from jar file
    source = "zip/test.zip"
    destination = "c:\\"
    public void unzip(String source,String destination){
              try{
                   ZipInputStream in = new ZipInputStream( this.getClass().getResourceAsStream(source));
                   FileOutputStream fos = null;
                   ZipEntry ze = null;
                   File ff = null;
                   while ( (ze=in.getNextEntry() ) != null ){
                        System.out.println( "name=" + ze.getName() );
                        ff = new File( destination + ze.getName() );
                        if ( ze.isDirectory() ){
                             System.out.println("making "+ze.getName()+" dir ("+ ff.mkdirs() +")");
                        else{
                             fos = new FileOutputStream( ff );
                             byte[] buf = new byte[1024];
                             int len;
                             while ((len = in.read(buf)) > 0){
                                  fos.write(buf, 0, len);
                             fos.close();
                             System.out.println("wrote file "+ff.getPath()+" success=" + ff.exists() );
                   in.close();
              }catch(Exception e){
                   e.printStackTrace();
         }     But i found error in extracting zip file
    java.io.FileNotFoundException: C:\eclipse\.eclipseproduct (The system cannot find the path specified)
    I need some quick response on it.

    Nothing to do with the resource path....thats fine. Use the code below.....most likely this will fix it.......
    Added a check for directories that start with a ".".  The File utility probably thinks its a file, also added a try....check it does make the "." directories.........dont forget the dukes.
        ZipInputStream zis = null;
        FileOutputStream fos = null;
        try
          zis = new ZipInputStream( new FileInputStream( "C:\\your_path\\your_zipfile_or_jar.zip" ) );
          ZipEntry ze = null;
          File ff = null;
          while ( ( ze = zis.getNextEntry() ) != null )
            System.out.println( "name=" + ze.getName() );
            ff = new File( "C:\\your_path\\" + ze.getName() );
            if ( ze.isDirectory()  || ze.getName().startsWith("."))
              try{ System.out.println( "making " + ze.getName() + " dir (" + ff.mkdirs() + ")" ); }catch(Exception e2){}
            else
              fos = new FileOutputStream( ff );
              byte[] buf = new byte[1024];
              int len;
              while ( ( len = zis.read( buf ) ) > 0 )
                fos.write( buf, 0, len );
              fos.close();
              System.out.println( "wrote file " + ff.getPath() + " success=" + ff.exists() );
          zis.close();
        catch( Exception ex )
          ex.printStackTrace();
        finally
          try { zis.close(); }catch(Exception ex){}
          try { fos.close(); }catch(Exception ex){}
        }

  • My daughter's ipod nano shows up in "devices" when I plug it in...but it disappears.  Right away it says it needs to update, but then after extracting the files it comes back and says that it can't be updated because it can't be unmounted.  help?!

    My daughter's ipod nano shows up in "devices" when I plug it in...but it disappears.  Right away it says it needs to update, but then after extracting the files it comes back and says that it can't be updated because it can't be unmounted.  help?!

    When in DFU mode and connected to the computer iTunes does not say anything but iTunes will see the iPod and you can restore the iPod via iTunes. When in recovery mode and you connect, iTunes will say it found an iPod in recovery mode.

  • I have to extract all files from a hard drive of a macbook pro that is no longer working. All I have to access the hard drive is a PC, is this possible, and if so how?

    I have to extract all files from a hard drive of a macbook pro that is no longer working. All I have to access the hard drive is a PC, is this possible, and if so how?

    You could try Paragon HFS+ for Windows. That would allow you to read and write files from a Mac-formatted drive.
    Clinton

  • How can I extract a file name / path from a local path variable in TestStand?

    I have local TestStand string variable, call it 'locals.path', that contains a path to a file including the file name (c:\inputs\input.txt). I need to be able to split up the path (c:\input) and the file name (input.txt) and save them into 2 local variables. What is the best way to do this?
    After reading through some of the other forums, it looks like there are some built-in functions that can accomplish this, but I am unable to find how to use them anywhere on the NI web site. One forum said to use the File I/O>Strip Path.file function. How is this called? Is this function in a DLL?
    I know that there are a number of DLLs that are installed with TestStand into the c:\windows\system32 directory. One forum made note of CVI_OpenFile / CVI_ReadFIle functions in the cvirt.dll that I used to solve a problem that I had in the past. The problem is that I had no idea that that these functions even existed and would have never known unless a similar question had been posted previously. Is there some place that these DLL function interfaces are defined or documented? Is there a function that can extract the file name out of a string for me?
    Thanks,
    Mike

    Hi,
    There sound like functions in say LabVIEW or CVI.
    I have attached a small example which may help. (I have not allowed for any error trapping, if say you dont find the file and cancel)
    Regards
    Ray Farmer
    Message Edited by Ray Farmer on 10-16-2006 10:04 PM
    Regards
    Ray Farmer
    Attachments:
    Sequence File1.seq ‏33 KB

Maybe you are looking for