View Single Post
 
Old 04-13-2012, 03:26 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

Hi TishyMouse,

Yes, unless you specify a storyrange (and there are various ways of doing this), Word assumes you're only referring to the main story.

While the selection might not have been the 'problem', your code can be made much more efficient without it:
Code:
Sub ProcessShapes()
Dim DocSource As Document, DocTarget As Document
Dim RngStry As Range, Shp As Shape
Set DocSource = ActiveDocument
Set DocTarget = Documents.Add("Normal")
For Each RngStry In DocSource.StoryRanges
  For Each Shp In RngStry.ShapeRange
    With Shp
      .Copy
      DocTarget.PasteAndFormat (wdPasteDefault)
    End With
  Next
Next
Set DocTarget = Nothing: Set DocSource = Nothing
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote