Sub TextInTable()
Dim oSection As Section
Dim oRange As Range
Dim StartWord As String, EndWord As String
StartWord = "Nome"
EndWord = "Caminho"
If ActiveDocument.Sections.Count > 0 Then
For Each oSection In ActiveDocument.Sections
Set oRange = oSection.Range
oRange.Select
With ActiveDocument.Content.Duplicate
oRange.Find.Execute Findtext:=StartWord & "*" & EndWord, MatchWildcards:=True
oRange.MoveStart wdCharacter, 0
oRange.MoveEndUntil vbCr
oRange.Cut
oRange.Tables(1).Cell(2, 2).Paste
End With
Next oSection
End If
End Sub
Question
crisreis
Caros programadores,
Gostaria que alguém me ajudasse a corrigir este código.
Minha intenção é colocar o texto na tabela, célula (2,2).
Qualquer ajuda é bem-vinda.
O arquivo original está em:
http://www.4shared.com/document/mgde22MJ/r...io_final_2.html
E o código segue abaixo:
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.