#1
|
|||
|
|||
Extract a List of Embedded Documents from a Word Document.
As the title says, looking to extract a listing of embedded documents from a single Word document.
Something similar was done for images by Paul Edstein in this post: https://www.msofficeforums.com/word-...ames-word.html With this code: Sub Demo() Dim Shp As Shape, iShp As InlineShape Dim StrShp As String, StriShp As String With ActiveDocument For Each iShp In .InlineShapes StriShp = StriShp & vbCr & iShp.AlternativeText Next For Each Shp In .Shapes StrShp = StrShp & vbCr & Shp.AlternativeText Next .Range.InsertAfter vbCr & "Inline Shapes:" & StriShp _ & vbCr & vbCr & "Floating Shapes:" & StrShp End With End Sub If someone could let me know the tweaks to make, i would be grateful. Cheers |
#2
|
||||
|
||||
Whilst it's possible to extract the content from embedded documents (see, https://www.msofficeforums.com/150817-post2.html), it is not possible to retrieve the original filenames; only the filenames of linked objects can be retrieved. The only reason the code from your link worked is because someone had gone to the effort of including the original filenames in the images' Alternative Text property - a property embedded documents lack.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
embedded file list |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extract Document ID and description from header in multiple Word documents and paste in new word doc | venkat_m | Word VBA | 2 | 05-23-2020 03:57 AM |
Find embedded documents in Word 2016 | GreenBoy | Word | 2 | 03-28-2018 01:04 AM |
Extract Data from Word Documents | hiwire03 | Word VBA | 3 | 01-29-2016 09:19 PM |
Embedded Word documents cause crash | Ted C | Word | 1 | 06-07-2015 03:55 AM |
How to extract two different output documents from 1 master document? | wimvanrompuy | Word | 3 | 06-20-2014 06:43 AM |