0

我正在创建一个简单的发布者应用程序,我需要在其中从字符串数组中将文本插入到不同的文本框中。我已经像这样对其进行了编码。

    Dim texts(40) As String 'Array of strings to be inserted 

    shpTextBox = appPub.ActiveDocument.Pages(pageIndex).Shapes.AddTextbox _
          (Orientation:=PbTextOrientation.pbTextOrientationHorizontal, _
          Left:=pbShape.Left - 20, Top:=pbShape.Top, _
          Width:=72, Height:=18)


                'add text 
                shpTextBox.TextFrame.TextRange.Text = texts(Index)'Problem here , Only First array value is populating to very first text box , rest are empty strings.

                Index = Index + 1 

现在它只用数组中的第一个字符串(对于第 0 个索引)填充第一个文本框,其余文本框包含空字符串,尽管 texts 数组有值。

任何帮助将不胜感激。

谢谢。

4

1 回答 1

0

将代码更改为 C#,现在可以正常工作了...!!

于 2011-05-17T06:02:15.570 回答