Jump to content
Fórum Script Brasil
  • 0

colocar texto em tabela II


crisreis

Question

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:

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

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...