Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro for WORD

Status
Not open for further replies.

amecari

Technical User
Mar 21, 2001
29
BR
Hi,

I need to write a VBA code that fill a line and collum in a .doc (WORD) . Ex. I need to put name in line 2, columun 3 but in word not excel. Its possible ????

Thanks,

 
Assuming the text needs to go into a table, you can use:-

Sub InsertName()
Dim rng As Range
Set rng = ActiveDocument.Tables(1).Cell(Row:=2, Column:=3).Range
rng.Text = "Hello!"
Set rng = Nothing
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top