Stel uw vraag

Kitfox's profiel - activiteit

2019-07-04 23:37:42 +0200 badge ontvangen  Beroemde vraag (bron)
2019-03-30 23:16:25 +0200 koos een beste antwoord Border Macro No Longer Works

A couple years ago some helpful soul on this forum got me to Record a Macro to create a Thick Border around the outside of the selected cell group (outerBorder) and a Thin Border between the cells (innerBorder). I used it successfully at the time and several times since then. I added it to the Toolbar so it would be easy to use.

Recently I needed to have that functionality again but my Toolbar button was not working. It only added the Outer Border.

I finally decided to Record a new Macro. When I run the Macro, it does the same as my old Macro did. I draws the Outer Border but no Inner Borders. Since this used to work I am assuming it is a bug but I haven't been able to find any info on it or a workaround.

Here is the Macro code:

sub ThickThin
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(7) as new com.sun.star.beans.PropertyValue
args1(0).Name = "BorderOuter.LeftBorder"
args1(0).Value = Array(0,0,71,0,0,71)
args1(1).Name = "BorderOuter.LeftDistance"
args1(1).Value = 0
args1(2).Name = "BorderOuter.RightBorder"
args1(2).Value = Array(0,0,71,0,0,71)
args1(3).Name = "BorderOuter.RightDistance"
args1(3).Value = 0
args1(4).Name = "BorderOuter.TopBorder"
args1(4).Value = Array(0,0,71,0,0,71)
args1(5).Name = "BorderOuter.TopDistance"
args1(5).Value = 0
args1(6).Name = "BorderOuter.BottomBorder"
args1(6).Value = Array(0,0,71,0,0,71)
args1(7).Name = "BorderOuter.BottomDistance"
args1(7).Value = 0

dispatcher.executeDispatch(document, ".uno:BorderOuter", "", 0, args1())
2019-03-30 23:13:53 +0200 badge ontvangen  Beroemde vraag (bron)
2018-09-06 19:13:39 +0200 badge ontvangen  Opvallende Vraag (bron)
2018-03-19 17:33:00 +0200 badge ontvangen  Populaire Vraag (bron)
2018-03-19 07:07:23 +0200 badge ontvangen  enthousiast
2018-03-18 21:11:15 +0200 stelde een vraag Copy/Paste From One Sheet to Another

Copy/Paste From One Sheet to Another I have a Budget spreadsheet that I have been using for years in Excel. There is a s

2018-02-11 06:23:35 +0200 badge ontvangen  Opvallende Vraag (bron)
2018-02-10 07:41:17 +0200 badge ontvangen  Populaire Vraag (bron)
2018-02-10 04:48:50 +0200 reageerde op een antwoord Border Macro No Longer Works

Perfect!!!! Works great! Thanks for the help!!!

2018-02-10 04:08:35 +0200 badge ontvangen  Student (bron)
2018-02-10 03:56:31 +0200 reageerde op een vraag Border Macro No Longer Works

I changed it as you suggested.

2018-02-10 03:55:56 +0200 bewerkte een vraag Border Macro No Longer Works

Border Macro No Longer Works A couple years ago some helpful soul on this forum got me to Record a Macro to create a Thi

2018-02-10 02:05:39 +0200 stelde een vraag Border Macro No Longer Works

Border Macro No Longer Works A couple years ago some helpful soul on this forum got me to Record a Macro to create a Thi

2018-02-09 23:53:43 +0200 badge ontvangen  Beroemde vraag (bron)
2018-01-20 23:00:08 +0200 reageerde op een vraag Creating new border style changes formatting

I figured out what is going on but have no idea how to do what I want to do. When the style is saved, it only uses the u

2016-08-25 19:04:35 +0200 badge ontvangen  Opvallende Vraag (bron)
2016-08-14 00:22:09 +0200 reageerde op een antwoord Struggling with Border around selection

Thanks! For others that try to do this, you may need to enable Macro Recording first.

2016-08-14 00:21:28 +0200 badge ontvangen  Leerling (bron)
2016-08-13 23:39:13 +0200 badge ontvangen  Populaire Vraag (bron)
2016-08-13 07:33:01 +0200 stelde een vraag Struggling with Border around selection

I am trying to create a Style so that I can have thick borders like I get in Excel. I can setup a border around a cell but I need to have a border around a selection of cells. I have tried to select a group of cells and then go to Styles & Formatting and create a new Style. Unfortunately, this only shows me the options for a single cell and not a selection of 2X2 or more like I can see if I just go to formatting.

How can I create a Border style that is just a thick border around the selection and not for every cell in the selection?