Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-24-2020, 10:38 AM
CamJohnston CamJohnston is offline Extract a List of Embedded Documents from a Word Document. Windows 10 Extract a List of Embedded Documents from a Word Document. Office 2019
Novice
Extract a List of Embedded Documents from a Word Document.
 
Join Date: May 2020
Posts: 1
CamJohnston is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 05-24-2020, 03:04 PM
macropod's Avatar
macropod macropod is offline Extract a List of Embedded Documents from a Word Document. Windows 7 64bit Extract a List of Embedded Documents from a Word Document. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply

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
Extract a List of Embedded Documents from a Word Document. 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
Extract a List of Embedded Documents from a Word Document. Embedded Word documents cause crash Ted C Word 1 06-07-2015 03:55 AM
Extract a List of Embedded Documents from a Word Document. How to extract two different output documents from 1 master document? wimvanrompuy Word 3 06-20-2014 06:43 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:12 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft