Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

interop Shapes and text link behavior 2005 to 2013

$
0
0

Hi, I have an application that I am upgrading from VB 2005 to 2013.  It uses the Interop Libraries to interact with word.  It loops through shapes and look for a linked textbox to know where to put some text.  In the following code the 2005 version detects the linked textbox, but the 2013 version always comes back Nothing.  I do not see any notes in the documentation that would indicate that how this works should have changed.  Any ideas to make this work or do it a different way?  Thanks.

Dim NoteBoxes As New Collections.Generic.SortedDictionary(Of Integer, Word.TextFrame)
Dim shapeIdx As Integer = 1
For Each myShape As Word.Shape In MyDoc.Sections.First.Headers(Word.WdHeaderFooterIndex.wdHeaderFooterPrimary).Shapes
 If Not myShape.TextFrame.Next Is Nothing Then
                NoteBoxes.Add(shapeIdx , myShape.TextFrame)
                shapeIdx += 1
       End If
Next


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>