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.

Similar Messages

  • Copy and pasting from PDF to Word for Mac

    I have a Mac Book Pro and I am having difficulty in copying from PDF to Word documents. Specifically, I cannot highlight the text that I want to move to the Word document. I have followed the help suggestions, and found that the PDF has not encription barriers. The cursor does not go from the arrow head to the other symbol that would allow me to highlight that which I want to copy. I have the text tool, and under edit, the copy word is ready. I am at a loss, as I can copy from e-mail and other things. Thanks.

    I'm glad you've got the problem licked now, or at least understand the limitations on some of your downloaded PDF documents. I suspect those limitations will apply to all documents that are downloaded from the same database or source, and will consistently not apply to documents downloaded from specific other databases, because of differences in the way documents are scanned by different database services.
    By way of clarification, let me just point out that what you are calling Acrobat, which used to be called *Acrobat Reader,* is now officially called *Adobe Reader.* Adobe changed the name to distinguish more clearly between Acrobat — an expensive commercial application for +creating, modifying and manipulating+ PDF files — and the freeware Adobe Reader, which only enables you to view them. You'll avoid needless confusion by calling the Reader by its proper name in the future. No big deal, though: lots of people make the same mistake here. (I've explained this distinction to my wife any number of times, and have finally learned not to bother doing it again: she simply doesn't care.)

  • Copy and paste from pdf to word

    Hello,
    When I cut and paste pictures from pdf files into my word documents using my mac, the pasted content appears colored black and I am not able to select what I truly mean to. I am able to do this easily with a pc - but prefer to do it with my laptop.
    Thanks for your help,
    ktkayteakt

    Try using shift/apple/4 - gives you a cross-hair selector to grab part of the screen - saves as Picture1.png to your Desktop then drag that into Word.
    Or, /Utilities/Grab

  • Lync 2013 and problem with copy/paste from SQL Mgmt Studio.

    Hi Everyone,
    Recently one of ours programmers noticed a very interesting issue which is a real pain in the a## for him and his colleagues. It was all fine with Lync client 2010, problem started when moved some people to 2013 client.
    When someone sends him a message with SQL Code, and he is pasting it into SQL mgmt std. he gets dashes "-" instead of spaces " ".
    I thought this is a local PC issue, but:
    1. On 2010 it worked, stopped all of a sudden when they changed lync client to 2013
    2. They are pasting code on the SERVER not local SQL mgmt std. on their client machines
    3. Even if I send him a code from Lync 2010 and he is pasting that from his 2013 client - he gets "-" dashes, so I guess it is not important from where I send the message, but from where he is copying it.
    As for now, I have noticed that problem with guys from England and region of APAC - they have lync 2013 client already.
    Really appreciate any help as I donot have any point where to start troubleshooting...
    Cheers guys,

    Hi,
    I test the issue with my colleague and didn't find the same issue.
    Here is the screenshot:
    So please check if Lync Server 2013 and all the issued Lync 2013 client update to the latest version firstly, it not update to the latest version, update it and then test again.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • How do I convert a file located in my e-mail from PDF to Word.  I can't seem to save it in my word files.

    How do I convert a file located in my e-mail (that is secured) from PDF to Word.  I can't seem to save the PDF file anywhere.

    Hi williamf,
    For starters, please try triple-clicking in the Word document where you want to edit the text (sometimes, that's what it takes to select text in Word). If that doesn't work, I'd be interested in hearing more about the PDF file that you converted and the method that you used to convert it. For example, how was the PDF created (and by what app)? Did you convert via Adobe Reader (what version) or via the ExportPDF website?
    If you can tell us more about the file, we should be able to get to the bottom of things.
    Best,
    Sara

  • How do I prevent itunes from moving my music from its original place ie folders in an external drive when I play music from itunes. I have all my music in artist folders and separated by MPG3/MPG4 and FLAC folder within the artist folder.

    How do I prevent itunes from moving my music from its original place ie folders in an external drive when I play music from itunes. I have all my music in artist folders and separated by MPG3/MPG4 and FLAC folders within the artist folder and itunes moves the track/s whenever i try and load selected music to my ipod/iphone. I've tried to find some sort of preference to prevent this, but no joy? What am I missing?

    Try opening iTunes preferences. Then click on advanced tab. Then uncheck "Copy files to iTunes media folder when adding to library." By default, iTunes copies music to its own media folder when you use iTunes to play the music.

  • I am batch processing in PS 2014 (watermark and saving as jpeg from ps file). I get the message for some but not all 'this file needs to be saved as a copy with this option'. And then I have to save it manually. Does anyone know why this happens? (It is j

    I am batch processing in PS 2014 (watermark and saving as jpeg from ps file). I get the message for some but not all 'this file needs to be saved as a copy with this option'. And then I have to save it manually. Does anyone know why this happens? (It is just a plain photoshop file, a watermark is added, then save as jpeg - the jpeg is saved to a different folder than the original photoshop file.)  It happens for about 10 of 30/40  files approximately . Thank you, Kathryn

    I believe I have figured it out - I need to flatten the image, even though there are no layers except for layer 0, first.

  • In Photoshop Elements 12, is there a way to batch process all photos in a file with 'Auto Tone' and save the changes?

    In Photoshop Elements 12, is there a way to batch process all photos in a file with 'Auto Tone' and save the changes?

    Thank you, that was perfect!
    Yoni

  • I want to upgrade my mac os 10.6.8 to 10.8.2 , will this erase all my files,apps,etc ? and will i loose the licence of microsoft office 2011, how to make a backup on a pendrive ?  I have files of approx 180 gb , THANK YOU

    I want to upgrade my mac os 10.6.8 to 10.8.2 , will this erase all my files,apps,etc ? and will i loose the licence of microsoft office 2011, how to make a backup on a pendrive ?  I have files of approx 180 gb , THANK YOU !!

    Forget the Pendrive stategy...
    Before attempting any Major Upgrade... get yourself an External Hard Drive... and create a Bootable Clone Backup of your current Hard Drive...
    By far the easiest way to make such a Backup, is to use something like
    SuperDuper  http://www.shirt-pocket.com/
    or CCC  http://www.bombich.com/
    That way, should anything untoward happen during the Upgrade,
    you will NOT LOSE ANYTHING.
    (Get an EHD that is at least equal to your current Drive...)
    Also, Check here for compatibility of 3rd party Software you may be using...
    http://roaringapps.com/apps:table
    You should also consider more RAM... Get the Maximum you can for your Mac...
    It is important to get the Correct and Matching RAM
    See Here  >  OWC RAM  >  http://www.macsales.com

  • I just bought a new Mac mini and can't remember my password to get into the computer. Is there anyway I can unlock my computer without loosing all my files, especially all my photos?

    I just bought a new Mac mini and can't remember my password to get into the computer. Is there anyway I can unlock my computer without loosing all my files, especially all my photos?

    Hi Jeff,
    Reset Password 10.7, 10.8...
    http://reviews.cnet.com/8301-13727_7-20087723-263/how-to-run-the-password-reset- utility-in-os-x-10.7-lion/
    Then Reset your Keychain...
    http://support.apple.com/kb/TS1544

  • Re: Migrating my IPhoto from Time Machine Backup to my just-installed Snow Leopard OSX... the program is there, all my photos are there..... but my photos had all been neatly arranged in folders, and there is absolutely no sign of my folders.  What a mer

    re: Migrating my IPhoto from Time Machine Backup to my just-installed Snow Leopard OSX... the program is there, all my photos are there..... but my photos had all been neatly arranged in folders, and there is absolutely no sign of my folders. What a mess, 20,000 photos.  How can I restore my folders?
    (iphoto 08)

    Restore the library from Time Machine as shown in this screenshot:
    Then open the library with iPhoto.  No importing necessary.
    OT

  • I am just learning Lightroom 5. Noticed very recently that 'Photo is Missing' has come up against virtually all my files over all my folders/subfolders. That said, using Finder on my MAC I can see thumnails of ALL my images which sit within my Pictures Fo

    I am just learning Lightroom 5. Noticed very recently that 'Photo is Missing' has come up against virtually all my files over all my folders/subfolders. That said, using Finder on my MAC I can see thumnails of ALL my images which sit within my Pictures Folder. Equallly on my back-up on the Mac's Time Machine all versions of same images are present. Any solutions?

    It means that the photos have been moved or renamed or deleted outside of Lightroom. (Hint: don't do that)
    To fix the problem, please follow these instructions:
    http://www.computer-darkroom.com/lr2_find_folder/find-folder.htm

  • My computer hard drive crashed but I have a HP Recovery Backup of it with all the files unzipped. How can I retrieve my emails from this backup on my new comput

    II lost my HP hard drive after doing a HP Recovery Backup using Windows 7. I now have a new computer using Windows 8.1 and I have successfully unzipped all my files including my Thunderbird and Firefox profiles,. I have installed Firefox and Thunderbird on the new computer but cannot figure out how to get my bookmarks (Firefox) or my emails (Thunderbird) off these old profiles. Just substituting the old profiles stops the applications from opening and obviously I did not create these using the application export facility. Can the application be fooled by renaming the file with the name of the new profile? or is there some internal code that the program checks. I'm totally at a loss.

    The Profile names have to match what Firefox and Thunderbird is expecting to find. Any difference and they may not start, or they may just create a new Profile ''as they are supposed to when the expected Profile is "gone".''
    You can rename the old Profiles to the names of the new Profiles; or you can carefully edit the profiles.ini file to match the Profile names of the old Profiles. ''One mistake and it's toast, though.''
    But IMO, the best thing to do is to go to the folder level where the '''profiles.ini''' file and the '''profiles''' folderset is located --
    '''%APPDATA%/Mozilla/Firefox/ '''
    where you should find '''profiles.ini''' and the '''Profiles''' folder, ''and maybe other files / folders''
    Copy that whole '''Firefox''' folder from the old installation over to the new one.
    With Thunderbird that should work the same as it is based upon the basics in Firefox, but I have never used Thunderbird.

  • Will the new iCloud provide storage/backup/sharing for all my files on all my devices?

    Will the new iCloud be able to:
    Allow me to share/backup/view all my files on all my devices.
    Use a public folder to share with staff, friends and family like Mobile Me could do.
    Thx much

    PV,
    Thx for your commercial on Apple's iCloud.
    Been and Apple user since 1977 and iCloud STINKS!!!!
    Let me be clear....I spent $100-125 for MobileMe and would be very, very, very happy to continue to spend that and more for storage/backup/sharing of my files/photos/videos on iCloud.
    It is now much worse than Mobile Me, yes Mobile Me was great!!
    Very, very sorry that iCloud is very, very bad.
    Apple has done a great job providing us with many devices to share our files and documents, but Apple's iCloud does not allow us to share/back-up/view our files.
    This is sad, very, very, very sad.

  • 3 iphones in household.All use same apple ID.But all contacts get mixed between phones and facetime calls come in from other contacts.Ho can we change this so our phone information isn't visible to each other?

    3 iphones in household.All use same apple ID.But all contacts get mixed between phones and facetime calls come in from other contacts.How can we change this so our phone information isn't visible to each other?

    Use separate Apple IDs for each family member and use Family Sharing features of those things (if any) that you do want to share. https://www.apple.com/ios/whats-new/family-sharing/

Maybe you are looking for

  • Battery damaged after just one year of use

    I am a medical student residing in hostel.I bought my Lenovo3000N100 notebook in feb'2007.After just one year of very minimal usage, the notebook battery has failed and now requires replacement. How can such a company as lenovo's battery expire after

  • Apple TV does not appear in Preferences

    Apple TV appears in the sidebar but not in preferences. Then I click on Apple TV in the sidebar, there are no settings options.

  • PowerBook G3 (PDQ) - Startup disk and PCMCIA slot problem

    Hello I have encountered a problem with my powerbook G3 (PDQ model) Once when I had to configure my microphone, I saw that there was "Zoomed video" present in the list of audio inputs. I thought this was a glitch, and inserted my SD card reader into

  • Cannot edit scanned documents

    I have an Epson printer which allows me to edit things (pdf)I have scanned. Since I installed a new version of adobe reader X, I get an error message that stated "pdf is not a valid Win.32 application" I have windows 7 Mari

  • IMac "Color Wheels" Despite Tons of Free CPU & Memory

    Hello ASC, That wretched spinning color wheel has been plaguing my iMac lately. I’ve keep an eye on the Activity Monitor and even when the wheel freezes up my Safari, Spotlight Search, Mail and Messages apps, my *free* CPU hardly dips below 97% and m