greathope123
Programmer
In App.Path & "\myDoc.doc", I have a Picture and a WordArt. Run following code, I got
"TextEffect.PresetTextEffect = -2"
Private Sub Command1_Click()
Dim wApp As New Word.Application, wDoc As Word.Document
wApp.Visible = True
Set wDoc = wApp.Documents.Open(App.Path & "\myDoc.doc")
Print "Count = " & wDoc.Shapes.Count
With wDoc.Shapes(2)
Print "Text = " & .TextEffect.Text
Print "TextEffect.PresetTextEffect = " & .TextEffect.PresetTextEffect
End With
End Sub
I thought there was some thing wrong. I then deleted the Picture and run following code, got
"TextEffect.PresetTextEffect = 3"
Can you tell me why!!
Private Sub Command2_Click()
Dim wApp As New Word.Application, wDoc As Word.Document
wApp.Visible = True
Set wDoc = wApp.Documents.Open(App.Path & "\myDoc.doc")
Print "Count = " & wDoc.Shapes.Count
With wDoc.Shapes(1)
Print "Text = " & .TextEffect.Text
Print "TextEffect.PresetTextEffect = " & .TextEffect.PresetTextEffect
End With
End Sub
"TextEffect.PresetTextEffect = -2"
Private Sub Command1_Click()
Dim wApp As New Word.Application, wDoc As Word.Document
wApp.Visible = True
Set wDoc = wApp.Documents.Open(App.Path & "\myDoc.doc")
Print "Count = " & wDoc.Shapes.Count
With wDoc.Shapes(2)
Print "Text = " & .TextEffect.Text
Print "TextEffect.PresetTextEffect = " & .TextEffect.PresetTextEffect
End With
End Sub
I thought there was some thing wrong. I then deleted the Picture and run following code, got
"TextEffect.PresetTextEffect = 3"
Can you tell me why!!
Private Sub Command2_Click()
Dim wApp As New Word.Application, wDoc As Word.Document
wApp.Visible = True
Set wDoc = wApp.Documents.Open(App.Path & "\myDoc.doc")
Print "Count = " & wDoc.Shapes.Count
With wDoc.Shapes(1)
Print "Text = " & .TextEffect.Text
Print "TextEffect.PresetTextEffect = " & .TextEffect.PresetTextEffect
End With
End Sub