Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

borders in excel

22 views
Skip to first unread message

Slava Solovei

unread,
Jun 11, 2001, 8:36:57 PM6/11/01
to
Hi everyone,

I am creating an excel spreadsheet using automation where I need to set a border
on a range of cells. ie:

borders = range.GetBorders();
borders.SetWeight(COleVariant((float)3.5));

That does it, but it changes of all the borders, I just want to chage the weight
of borders outside the range of the cells, I don't want to have borders
seperating the cells within the range. It should be something simple, however I
wasn't able to find anything on MSDN on it.

Thanks in advance.

Leo

unread,
Jun 11, 2001, 9:25:26 PM6/11/01
to
Hi,

We can try the code below to render one border.

Border bottomborder;
bottomborder = borders.GetItem((long)9); //Top: 8, Left: 7,
Right: 10; Bottom: 9
bottomborder.SetLineStyle(
COleVariant((short)-4119)); //xlDouble
= -4119
bottomborder.SetWeight(
COleVariant((short)4)); //xlThick = 4

For detailed information, we can refe to KB:

http://support.microsoft.com/support/kb/articles/q179/7/06.asp

Regards,
Leo

"Slava Solovei" <slava....@defence.gov.aunospam> wrote in message
news:5fe401c0f2d7$c97ce5b0$a5e62ecf@tkmsftngxa07...

pradeepr...@gmail.com

unread,
Jun 26, 2012, 4:45:10 AM6/26/12
to
Hello Everyone

I am facing similar problem.
I work in vc++6 environment.

I have to set only the inside horizontal border for tables. I am unable to do it programatically, but by following the below trick of using Borders.GetItem to get horizantal type or any other line type dosen't help.
It say an error message GetItem not member of Borders class.
I am working for word automation.

Please help.

Thanks
Pradeep Raghuraman
0 new messages