Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / May 2006

Tip: Looking for answers? Try searching our database.

Program with Borders in Style object  (Word)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brian Wong - 24 May 2006 03:57 GMT
Hi,

  I am not sure rather I post in the right newgroup. If not, can anyone
tell me where I should post this question. Thanks.

  I have trying to write a program in C# which extracts all the formatting
styles form a word document. However I got a problem with extracting paragpah
borders defined for a style. I have defined a style called "Note[Deanger]",
for this style, I have set the "Border Setting" to Box. When I run my
program, I use the following codes to extract the border style:

Word.Style style = wordDoc.Styles.Item("Note[Danger]");
border = style.Borders.Item(Word.WdBorderType.wdBorderTop);

the above code does return the correct border object  to me, however, the
border does not contains any information about LineStyle, Color etc. Does
aynone know why it is like this?  the Word.WdBorderType.wdBorderRight,
Word.WdBorderType.wdBorderLeft, Word.WdBorderType.wdBorderBottom all have the
same problem.


Klaus Linke - 25 May 2006 10:21 GMT
Hi Brian,

I don't speak C#, but since you've gotten no answer yet...

Looks like you are using reserved names (style, border) as variable names.
If that wasn't the problem, please post back!

Greetings,
Klaus

> Hi,
>
[quoted text clipped - 18 lines]
> the
> same problem.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.