Click here to Skip to main content
12,073,837 members (66,173 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: VB 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 10:28am
Edited 8-Nov-12 10:30am
RaisKazi34.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 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
Top Experts
Last 24hrsThis month


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100