Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 01-28-2018, 01:50 PM
Guessed's Avatar
Guessed Guessed is offline Extract pictures from Word Windows 10 Extract pictures from Word Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Martin

What you are asking sounds doable but would take more time than I have available at the moment. Macropod raised the question of inline vs floating shapes which would need to be answered but the basic (aircode) approach I would use is to loop the graphics and apply the heading 1 style at that point to work out the previous heading 1 number. You could also use a counter to keep track of how many graphics have already been found and reset that when the heading number increases.

My initial musings are
Code:
Sub ExportPicts()
  Dim aShp As InlineShape, i As Integer, sPath As String, sName As String
  Dim iCounter As Integer
  sPath = ActiveDocument.Path & Application.PathSeparator
  For Each aShp In ActiveDocument.InlineShapes
    iCounter = iCounter + 1
    aShp.Range.Paragraphs(1).Style = "Heading 1"
    i = aShp.Range.Paragraphs(1).Range.ListFormat.ListString - 1
    aShp.Range.Paragraphs(1).Style = "Normal"
    Debug.Print i, iCounter
    'not sure on the code to export inlineshape
  Next aShp
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
XML Schema Parent Child Extraction ChrisOK Excel Programming 0 11-16-2017 08:22 AM
Log file extraction xendistar Excel 0 09-01-2016 02:08 PM
Extract pictures from Word Data extraction from a cell! JTevez Excel 2 10-14-2015 11:56 PM
Extract pictures from Word Bibliography creation and automatic extraction styxsailor Word 3 11-30-2012 02:42 PM
Extract pictures from Word Email Extraction dpad Outlook 1 08-17-2010 06:01 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:26 AM.


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