|
-
Jul 30th, 2004, 04:09 AM
#1
Thread Starter
Lively Member
Line & Text Box in MS Word
I am trying to us insert a line and a text box in a doc file using VBA. I am able to insert the same but I need help on the following :
1. How to change the width of the line (Eg. Make it thin or fat)
2. How to insert default text (eg. My name) inside the text box.
I am enclosing the code for your reference.
-----------
Private Sub Command1_Click()
Dim oW As Word.Application
Dim oD As Word.Document
Set oW = CreateObject("Word.Application")
oW.Visible = True
Set oD = oW.Documents.Add
oD.Shapes.AddLine 50, 150, 150, 150
oD.Shapes.AddTextbox msoTextOrientationHorizontal, 200, 100, 50, 100
End Sub
-----------
Please help with a code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|