Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
WordDoc.Shapes.AddShape(1, 30, 15, 565, 760).ShapeStyle = "Colored Outline - Black,Dark 1"
I used this code above to make an rectangle into a word document using vs2010,but I have a problem because I don't know how to set shape style at "NO FILL".
 
This is an no fill shape style in word2010 but I don't know how to use:
""Colored Outline - Black,Dark 1"
Posted 8-Nov-12 9:28am
Edited 8-Nov-12 9:30am
RaisKazi32.1K
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You must assign a MsoShapeStyleIndex to the ShapeStyle.
 
To get a rectangle with No fill and black border Try this
 
WordDoc.Shapes.AddShape(1, 30, 15, 565, 760).ShapeStyle = Microsoft.Office.Core.MsoShapeStyleIndex.msoLineStylePreset1;
The enum MsoShapeStyleIndex has many more options, try them to get your desired shape.
  Permalink  
Comments
topsykretts89 at 8-Nov-12 16:45pm
   
:) Thank you my friend!!..That's solution.Did you know how to change weight of line to 1pt?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 382
1 Damith Weerasinghe 370
2 thatraja 350
3 Sergey Alexandrovich Kryukov 259
4 Ajith K Gatty 200
0 Sergey Alexandrovich Kryukov 10,639
1 OriginalGriff 6,658
2 Peter Leow 4,735
3 Abhinav S 3,813
4 Maciej Los 3,565


Advertise | Privacy | Mobile
Web03 | 2.8.140421.2 | Last Updated 8 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid