-
WSTroyWells
AskWoody LoungerOctober 6, 2006 at 8:09 pm in reply to: Number format as bullet in a multilevel list (Word 2003) #1032137When I ran that command with the bullet I wanted selected, it gave me 8226.
However, when I put that in the macro, it gave me those generic squares again.
Let me attach what I have and maybe you can see where I’m missing it.
Thanks!!
Troy -
WSTroyWells
AskWoody LoungerOctober 6, 2006 at 7:36 pm in reply to: Number format as bullet in a multilevel list (Word 2003) #1032125I know I should know this, how did you find the number?
It worked, but it put in the wrong bullet.
I know there is a simple macro/function that would give me the number I needed for the ChrW based on a selection. Could you please provide it?
I can get the symbol from the Symbols dialog, but I need the number.
Thanks!!
Troy -
WSTroyWells
AskWoody LoungerThanks to your fine example, I was able to come up with a script that is much faster (for a 300 page document with many tables it took 12 seconds compared to 6:45).
Please don’t take that as a criticism. Yours is much more elegant, and I learned much from it. I just didn’t need it all.
The following is my script:
Sub GetHeightInInchesForTooBigRows() Dim intCounter As Integer Dim aTable As Table Dim I1 As Integer 'This error statement handles rows with merged cells. On Error GoTo CombinedCellError GoTo AfterCombinedCellError CombinedCellError: If Err.Number = 5941 Then aTable.Rows(I1).Select aTable.Cell(I1, Selection.Columns.Count).Select Resume Next End If AfterCombinedCellError: Selection.HomeKey Unit:=wdStory For Each aTable In ActiveDocument.Tables For I1 = 1 To aTable.Rows.Count aTable.Cell(I1, aTable.Columns.Count).Select Selection.MoveRight Selection.MoveLeft If Selection.Information(wdVerticalPositionRelativeToPage) > 715 Then Selection.Rows(1).AllowBreakAcrossPages = True End If Next I1 Next aTable End Sub
Thanks for your help!!
Troy -
WSTroyWells
AskWoody LoungerSorry for the confusion. I am generating Word documents from RoboHTML and then trying to clean them up with VBA as much as possibly.
As I said in my orignal post, in most cases I want to DISallow rows breaking across pages, but for very large rows, rows that would not show all the data especially, I want to allow it. I know how to turn it on and off in VBA, but I just don’t know how to tell how big the row is to tell whether it is too big t shw everything.
Now, thanks to this error, of all things, I am able to detect rows that are too big. I have attached the text of my finished module. Most of it is the same as what you gave. I just added my error routine and a line to delete the added temp row.
Thanks again for your help!!
Troy -
WSTroyWells
AskWoody Lounger(Edited by TroyWells on 22-Sep-06 00:42. )
Thanks for this great example!! However, I had the following errors:
1. When I tried to paste the text into a module a got the following error:
“Compile error: Syntax error”
The problem seems to be with the first line:
Attribute VB_Name = "modLounge20060919"
What does this line do?
2. If I commented out that line, the function works fine until it gets to a row that is too big to be seen. At that point, it gives the following error:
Run-time error ‘4198’: Command failed
It is failing at the following line:
rngTemp.Rows.DistributeHeight
If I delete enough text out of that row so that it is entirely visible, it works fine.
Obviously, this defeats the purpose of the function since it is needed to measure the height of rows that are larger than the page.
Any ideas?
Thanks!!
Troy
——————————-EDIT
P.S. ACTUALLY, THIS SOLUTION WILL WORK FOR ME, but probably not for others who need to really know the height of this row.For me, all I need to do is create an “on error” statement where if the error number is 4198, I change the selected row to allow it to break across pages.
What do you think?
-
WSTroyWells
AskWoody LoungerSeptember 20, 2006 at 7:40 pm in reply to: Determining if you are in an end of row marker (Word 2003) #1029546Works great!! The help actually mentions a couple of things. The syntax was actually different from the example.
IsEndOfRowMark Property
See AlsoApplies ToExampleSpecificsTrue if the specified selection or range is collapsed and is located at the end-of-row mark in a table. Read-only Boolean.Note This property is the equivalent of the following expression:
Selection.Information(wdAtEndOfRowMarker)
Example
This example collapses the selection and selects the current row if the insertion point is at the end of the row (just before the end-of-row mark).Selection.Collapse Direction:=wdCollapseEnd If Selection.IsEndOfRowMark = True Then Selection.Rows(1).Select End If
Either one of them works. I searched several ways in the help, but never found this topic.
Thanks for the help!!
Troy -
WSTroyWells
AskWoody LoungerSeptember 11, 2006 at 12:21 am in reply to: Resetting a number in the middle of a list (Word 2003 VBA) #1028050OK. I can see that I would have to improve a lot to be clear as mud. Let me try.
I have 1 listtemplate, called “mylisttemplate”. It uses the following styles/formats:
Level 1 – paragraph style “style1” – Number format: “” (no number, just used to reset numbers on lower levels.)
Level 2 – paragraph style “style2” – Number format: “” (no number, just used to reset numbers on lower levels.)
Level 3 – paragraph style “style3” – Number format: “1.”
Level 4 – paragraph style “style4” – Number format: “a.”
Level 5 – paragraph style “style5” – Number format: “1)”No definitions beyond level 5 as I don’t use those in my lists.
My situation:
——————————-
1. List item 1.
2. List item 2.
(table that contains paragraph style “style1”. Because it contains style one, the next step restarts numbering at 1 instead of continuing a 3.Why does the table contain one of dummy styles, you might ask? Because the table contains two sets of substeps based on two alternative actions you could take in step 2. You could either take option 1 with sub-steps a. and b. or option 2 with sub-steps a. and b. I have to include paragraph style “style 1” to restart numbering within the table. Otherwise it would go: option 1 sub-steps a and b, then option 2 sub-steps c and d. Thus somewhere between option 1 and option two I put paragraph style “style 1” so the number restarts at the beginning of option 2. Unfortunately, this has the side effect of also restarting number in the list item immediately following the table. Thus…)
1. List item 3.
——————————-Thus, my proposed solution is to use a second list template for all numbering that appears within tables. It would be a similar mylist template, except that I would use different dummy styles at the first two levels to restart numbering. For example:
Level 1 – paragraph style “style6” – Number format: “” (no number, just used to reset numbers on lower levels.)
Level 2 – paragraph style “style7” – Number format: “” (no number, just used to reset numbers on lower levels.)
Level 3 – paragraph style “style8” – Number format: “a.”
Level 4 – paragraph style “style9” – Number format: “1)”These should restart numbering on items within the table that use paragraph style “style 8 or 9” but leave list items that use the first list template and paragraph style “style 3”, “style 4” or “style 5” unchanged.
At least that’s my theory. I’ll let you know how it turns out.
Enjoy!!
Troy -
WSTroyWells
AskWoody LoungerSeptember 10, 2006 at 10:16 am in reply to: Resetting a number in the middle of a list (Word 2003 VBA) #1027997Andrew,
Thanks for your kind attention to my problem!!As far as why I need to reset numbering in the middle of a list, I have a single list template named “myListItems”. It is a multilevel list where the first two levels are “dummy” list items that are tied to specific styles that help numbering to restart at other levels.
Thus my problem. When the styles appear, say in an if/then table in the middle of a list, and the list continues, it starts over at 1. I have to put some of those dummy styles in the table so I can restart substeps in the second if/then row of the table. I can manually change it to start at whatever I want, but I’d prefer to do it in a macro.
Hey, I just had a thought. If I create a second list template and use the macro to apply that to the list items in these tables, will that list template interfere with numbering before and after the table if the numbering before and after the table use the other list template? If not, that may solve my problem. I could create a new “dummy” style to use in the if/then tables to reset numbering for the second and following if/then scenarios, and that dummy style should not restart items in my first list template since it will not appear in that template.
What do you think, or did I lose you?
Troy
-
WSTroyWells
AskWoody LoungerSeptember 7, 2006 at 3:56 pm in reply to: Resetting a number in the middle of a list (Word 2003 VBA) #1027605Stuart,
I used the following:MsgBox Selection.Range.ListFormat.ListTemplate.Name
on steps that had not been reset and on a step I manually reset. They both came back with the same name.
Troy
-
WSTroyWells
AskWoody LoungerSeptember 7, 2006 at 3:30 pm in reply to: Resetting a number in the middle of a list (Word 2003 VBA) #1027595I have a single list template named “myListItems”. It is a multilevel list where the first two levels are dummy list items that are tied to specific styles that help it restart.
Thus my problem. When the styles appear, say in a table, and the list continues, it starts over at 1. I can manually change it to start at whatever I want, but I’d prefer to do it in a macro.
Any ideas would be appreciated!!
Thanks!!
Troy -
WSTroyWells
AskWoody LoungerSeptember 7, 2006 at 6:10 am in reply to: Resetting a number in the middle of a list (Word 2003 VBA) #1027501This code works in that it causes no error. The problem is that it causes all the lists in the entire document to start at whatever value is set here. In other words, if I want to change the startat value from “a” to “c”, all lists at that level in the entire document now start at “c”.
Any other ideas?
Thanks!!
Troy -
WSTroyWells
AskWoody LoungerSeptember 6, 2006 at 8:07 pm in reply to: Resetting a number in the middle of a list (Word 2003 VBA) #1027471Sorry, I guess I am not being clear. Nothing new for me.
I am not trying to “return” anything. I am trying restart number at, for example, “3” for a list item that is currently set to start at “1”.
How do I do that.
Thanks!!
Troy -
WSTroyWells
AskWoody LoungerSeptember 6, 2006 at 6:34 pm in reply to: Resetting a number in the middle of a list (Word 2003 VBA) #1027453(Edited by TroyWells on 06-Sep-06 19:34. )
I am trying to reset a list item number from 1 to 3 (or another number I calculate from a variable) in the middle of a list. Do to the dummy restart styles I have at the beginning of my list and how I have to use them, the numbers are restarting prematurely. Calculating the variable is no problem. Resetting the number is. I have tried using the following code:
Dim List1 As Long
Dim ListNumberBefore as IntegerSet List1 = ListGalleries(wdOutlineNumberGallery).ListTemplates(Selection.Range.ListFormat.ListTemplate.Name).ListLevels(Selection.Range.ListFormat.ListLevelNumber)
With List1
.StartAt = ListNumberBefore + 1
End WithHowever, I get the following error:
Compile error. Object required.
Please advise what I am doing wrong or if there is a better way.
Thanks!!
Troy -
WSTroyWells
AskWoody LoungerSeptember 6, 2006 at 6:33 pm in reply to: Resetting a number in the middle of a list (Word 2003 VBA) #1027458Sorry!! I did not name that variable well at all.
The ListLev variable is actually the list. I will edit my original post and rename to “List1”. I was trying to follow an example I found in the online help by setting this.
Sorry for the confusion, and please help!!
Thanks!!
Troy -
WSTroyWells
AskWoody LoungerAugust 22, 2006 at 1:07 pm in reply to: Suggest names option does not stay selected (Outlook 2003) #1025734I’ll double-check the “not closing properly” theory, but I am pretty sure I ruled that out in the past.
Where it the registry would I find a policy that would override this?
Thanks for the help!!
Troy
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Kevin Beaumont on Microsoft Recall
by
Susan Bradley
3 hours, 1 minute ago -
The Surface Laptop Studio 2 is no longer being manufactured
by
Alex5723
4 hours, 7 minutes ago -
0Patch, where to begin
by
cassel23
3 hours, 53 minutes ago -
CFPB Quietly Kills Rule to Shield Americans From Data Brokers
by
Alex5723
17 hours, 45 minutes ago -
89 million Steam account details just got leaked,
by
Alex5723
5 hours, 31 minutes ago -
KB5058405: Linux – Windows dual boot SBAT bug, resolved with May 2025 update
by
Alex5723
1 day, 2 hours ago -
A Validation (were one needed) of Prudent Patching
by
Nibbled To Death By Ducks
17 hours, 17 minutes ago -
Master Patch Listing for May 13, 2025
by
Susan Bradley
4 hours, 24 minutes ago -
Installer program can’t read my registry
by
Peobody
5 hours, 17 minutes ago -
How to keep Outlook (new) in off position for Windows 11
by
EspressoWillie
15 hours, 4 minutes ago -
Intel : CVE-2024-45332, CVE-2024-43420, CVE-2025-20623
by
Alex5723
22 hours, 25 minutes ago -
False error message from eMClient
by
WSSebastian42
1 day, 13 hours ago -
Awoke to a rebooted Mac (crashed?)
by
rebop2020
1 day, 22 hours ago -
Office 2021 Perpetual for Mac
by
rebop2020
1 day, 23 hours ago -
AutoSave is for Microsoft, not for you
by
Will Fastie
20 hours, 19 minutes ago -
Difface : Reconstruction of 3D Human Facial Images from DNA Sequence
by
Alex5723
2 days, 3 hours ago -
Seven things we learned from WhatsApp vs. NSO Group spyware lawsuit
by
Alex5723
1 day, 4 hours ago -
Outdated Laptop
by
jdamkeene
2 days, 8 hours ago -
Updating Keepass2Android
by
CBFPD-Chief115
2 days, 14 hours ago -
Another big Microsoft layoff
by
Charlie
2 days, 13 hours ago -
PowerShell to detect NPU – Testers Needed
by
RetiredGeek
11 hours, 8 minutes ago -
May 2025 updates are out
by
Susan Bradley
2 hours, 4 minutes ago -
Windows 11 Insider Preview build 26200.5600 released to DEV
by
joep517
2 days, 19 hours ago -
Windows 11 Insider Preview build 26120.3964 (24H2) released to BETA
by
joep517
2 days, 19 hours ago -
Drivers suggested via Windows Update
by
Tex265
2 days, 19 hours ago -
Thunderbird release notes for 128 esr have disappeared
by
EricB
15 hours, 44 minutes ago -
CISA mutes own website, shifts routine cyber alerts to X, RSS, email
by
Nibbled To Death By Ducks
3 days, 2 hours ago -
Apple releases 18.5
by
Susan Bradley
2 days, 21 hours ago -
Fedora Linux 40 will go end of life for updates and support on 2025-05-13.
by
Alex5723
3 days, 4 hours ago -
How a new type of AI is helping police skirt facial recognition bans
by
Alex5723
3 days, 4 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.