Change dotted line border around the Text Box to a solid line border



  • 1. Inserting a wdFieldFormTextInput into a word table cell
    I'm having issues inserting a wdFieldFormTextInput into a word table cell. I create the table with a macro which works perfectly. I then need to insert a wdFieldFormTextInput into the first rows 2nd cell. I can set the text easily enough using .............. [code] MyRange.Table(1).Rows(1).Cells(2).Range.Text = " Testy Text " [/code] I've tried multiple ways of adding the merge field all of which have failed. I'm grateful for any advice! Here is an example of what I've tied to do to accomplish what i'm after! [code] ActiveDocument.Fields.Add Range:=MyRange.Tables(1).Rows(1).Cells(2).Range, Type:=wdFieldFormTextInput, Text:="MERGEFIELD TESTMERGER", PreserveFormatting:=True [/code] I get the generic "Run-time error '4605': This command is not available" error message when trying to run the above.
  • 2. Adding Hyperlink Text, then deleting
    Hello, So, I have a big macro in Word 2003 that I've been working on that keeps growing. The end goal is to have a complete script to convert a Word document into a wiki formatted document (for posting on our internal wiki). I've got most of it down, but hitting a snag with changing hyperlinks into wiki formatted text. First, I need to find the hyperlinks, then I need to add wiki formatting in front of them and after them, then delete the hyperlink itself. To add to the issue, a significant number of my hyperlinks are tied to shapes so when I delete all hyperlinks - it removes them completely, leaving the shape but no address. Can you please help? Thank you, Alison

Change dotted line border around the Text Box to a solid line border

Postby Gilroy » Sat, 15 May 2004 22:51:50 GMT

How can I change the border of a Text Box to a solid line 
border?  I can get to the Text Box shape like this:


But I can't find the property to change the Text Box 

In Word XP, a user would change this manually by 
selecting the Text Box; select Format | Text Box; Change 
the value of Line Dashed to Solid.

Where is the Office 10.0 Object Library property that 
controls this action?  ;-)

Any help would be greatly appreciated.

Re: Change dotted line border around the Text Box to a solid line border

Postby Peter Hewett » Sat, 15 May 2004 23:45:16 GMT

Hi Gilroy

Try something like this:
    Word.Application.ActiveDocument.Shapes.Item(36) _
      .Line.DashStyle = msoLineSolid

BTW it's not part of the Office object model it's part of Words object model.

HTH + Cheers - Peter

"Gilroy" < XXXX@XXXXX.COM >, said:

Re: Change dotted line border around the Text Box to a solid line border

Postby Gilroy » Sun, 16 May 2004 02:24:37 GMT

That worked worderfully Peter.
Thank you!
of Words object model.

Similar Threads:

1.Multiline Border Printing as Solid Line Border

If the document was created in Word 2002 and the creator had not enabled
"Disable features introduced after Word 97," it's possible that a border was
used that is not supported in Word 97.

"Judy Morgan" < XXXX@XXXXX.COM > wrote in message
news:9de601c35c32$620cebc0$ XXXX@XXXXX.COM ...
> Multiline borders print as solid line borders in Word 97
> on an HP IIP printer.  Would appreciate any assistance in
> trying to resolve this issue.

2.Dashed Border line when it should be solid

I have a table:
14 columns wide
3 rows

I merge the cells column one and I merge the cells in 
column 14

I remove all borders and shading

The outside of the table is half pt solid lines

The 12 cells in what is the second row is outlined in one 
pt solid line

Cells 7,8,9 of these 12 have 25% grey shading

The left end of cell 7 and the right end of cell 9 have 
one pt solid lines.

When I print this table the bottom border of the table is 
dashed. The spaces are where the vertical grid lines would 

Can anyone tell me how to get word to print this properly?

3.can the line that borders a text box be removed

I'm trying to create an address label with a picture to the left of the text. 
The text box has a thin black line that borders the text box. Can this line 
be removed? I've tried going into Format>borders and shading to remove it, 
but can't. 

4.Text Box Border Line Style not working

I have a friend who selects a Line Style of a 4-1/2 double line in 
Format>Text box but the double line never shows up in his document.  He can 
create this line format on a different computer and emails it as an 
attachment to himself.  When he opens the emailed attachment it is still a 
single line even though the Format>Text box show that it is a double line 
style.  Is there a tool file or something missing from his Word Program on 
that computer?  I believe he has Word 2003.

5.Double Line Border Around Cell Leaving A Gap

Using Word2003

I have a problem with Word leaving a gap in a double line border
around a cell in a table (bottom right corner).  This happens from VBA
and the gui.

Construct a table with 1 column and a few rows.
Select the top row (which is one cell)

From GUI add a double line border with 3/4 pt

Or you can run the following macro when you have the cell selected.

You will see a gap in the bottom right hand corner on the outside
line.  Any ideas on how to get rid of it?

Sub Macro1()
' Macro1 Macro
' Macro recorded 10/15/2009 by bill
  With Selection.Cells
    With .Borders(wdBorderLeft)
      .LineStyle = wdLineStyleDouble
      .LineWidth = wdLineWidth075pt
      .Color = 10849427
    End With
    With .Borders(wdBorderRight)
      .LineStyle = wdLineStyleDouble
      .LineWidth = wdLineWidth075pt
      .Color = 10849427
    End With
    With .Borders(wdBorderTop)
      .LineStyle = wdLineStyleDouble
      .LineWidth = wdLineWidth075pt
      .Color = 10849427
    End With
    With .Borders(wdBorderBottom)
      .LineStyle = wdLineStyleDouble
      .LineWidth = wdLineWidth075pt
      .Color = 10849427
    End With
    .Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
    .Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
    .Borders.Shadow = False
  End With
  With Options
    .DefaultBorderLineStyle = wdLineStyleDouble
    .DefaultBorderLineWidth = wdLineWidth075pt
    .DefaultBorderColor = 10849427
  End With
End Sub

6. Deleting borders around text boxes

7. Border art around text boxes

8. Removing border around text boxes?

Return to MS WORD


Who is online

Users browsing this forum: No registered users and 72 guest