Reply
 
Thread Tools Display Modes
  #1   Report Post  
krazykaigh krazykaigh is offline
Junior Member
 
Posts: 2
Default Numbered List... Restart numbering in the middle

I have a Word document that I am using bookmarks to basically merge with data from my 2007 Access DB. In the code behind the button to fill the document I have the following (partial code)

Dim yada as yada ' all the dim stuff is up top in the code

Set WordObj = CreateObject("Word.Application")
Set WordDoc = WordObj.Documents.Open _
("C:\Users\ktaylor\Documents\LAST WILL AND TESTAMENT.dotx")
WordObj.Visible = True
Now through the code I "goto" certain bookmarks and insert text. For example:

' Go to the bookmark named "TitleWholeName"
Set WordRange = WordDoc.Goto(What:=wdGoToBookmark, Name:="TitleWholeName")
WordRange.InsertAfter strName

Now I have not defined any list at all. In the document template there are 7 numbered paragraphs and between each number, there may be more than one paragraph. For example:

III (this is centered in the document - and part of a numbered list)

Blah blah, yada blah yada yada.

IV (this too is centered in the document)

More important text is here, yada, something else.

(this is where I would like to insert a new paragraph number, followed by another paragraph of text. I have a Bookmark name NewPara already here)

V (this too is centered and a list number item)

A paragraph may or may not be inserted above this one. Yada, blah, yada yada blah.

So, I would like to know how to insert a line number at the bookmark NewPara

Thanks for any help in advance!
  #2   Report Post  
Venky62 Venky62 is offline
Junior Member
 
Posts: 19
Default

Your question is not clear.
Are you using automatic numbering for the paragraphs, or are you manually typing I, II, III etc. at each place?
How often do you have to do this? If it is just once in a while, then may be simpler to do it manually.
Do you have to insert number only at one paragraph or many such places in between?
Your answers may help participants to help you.
  #3   Report Post  
Posted to microsoft.public.word.pagelayout
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default Numbered List... Restart numbering in the middle

If you need exactly two numbering sequences, you can set up two different
styles, which will guarantee that you get two separate numbered lists.

If you need additional assistance with the actual coding, your best choice is to
ask a question in the Office programming forum at Microsoft Answers:
http://answers.microsoft.com/en-us/o...page=1&tab=all.

--
Stefan Blom
Microsoft Word MVP





"krazykaigh" wrote in message
...

I have a Word document that I am using bookmarks to basically merge with
data from my 2007 Access DB. In the code behind the button to fill the
document I have the following (partial code)

Dim yada as yada ' all the dim stuff is up top in the code

Set WordObj = CreateObject("Word.Application")
Set WordDoc = WordObj.Documents.Open _
("C:\Users\ktaylor\Documents\LAST WILL AND TESTAMENT.dotx")
WordObj.Visible = True
Now through the code I "goto" certain bookmarks and insert text. For
example:

' Go to the bookmark named "TitleWholeName"
Set WordRange = WordDoc.Goto(What:=wdGoToBookmark,
Name:="TitleWholeName")
WordRange.InsertAfter strName

Now I have not defined any list at all. In the document template there
are 7 numbered paragraphs and between each number, there may be more
than one paragraph. For example:

III (this is centered in the document - and part of a numbered list)

Blah blah, yada blah yada yada.

IV (this too is centered in the document)

More important text is here, yada, something else.

(this is where I would like to insert a new paragraph number, followed
by another paragraph of text. I have a Bookmark name NewPara already
here)

V (this too is centered and a list number item)

A paragraph may or may not be inserted above this one. Yada, blah, yada
yada blah.

So, I would like to know how to insert a line number at the bookmark
NewPara

Thanks for any help in advance!




--
krazykaigh


  #4   Report Post  
krazykaigh krazykaigh is offline
Junior Member
 
Posts: 2
Default

Quote:
Originally Posted by Venky62 View Post
Your question is not clear.
Are you using automatic numbering for the paragraphs, or are you manually typing I, II, III etc. at each place?
How often do you have to do this? If it is just once in a while, then may be simpler to do it manually.
Do you have to insert number only at one paragraph or many such places in between?
Your answers may help participants to help you.
I tried to upload a file but the size restrictions would not let me upload a one-page sample. So I will try to be more clear.

I am using a .DOTX (Word 2007 Template). It is a complete document with bookmarked locations throughout it.

There are already Numbered paragraphs (like bullets but numbers). The numbered paras separate from the text paragraphs, like this:
START SAMPLE:

I
This is the first paragraph.
II
This is the second paragraph.
Now this could be the third paragraph but in may not be numbered.
III
Then another paragraph.

END SAMPLE

Now everything is properly spaced in the real document. The numbers are autonumbered, so if I remove one, the others automatically change, appropriately.

I think it will be easier to add numbers to particular bookmarks to look like it is properly numbered , rather than trying to get .range.applydefaultnumber to change the numbers.

I have tried so many combos but either a paragraph gets a new number added to it, and then inserts a new paragraph with the next number or some other unexpected outcome.

And, there is really only one paragraph that would need the number added. If someone wants a special distribution on their will, the program adds that paragraph. Normally they don't, so it doesn't add that paragraph.

Have I made this any more clear?

Kaigh
  #5   Report Post  
Venky62 Venky62 is offline
Junior Member
 
Posts: 19
Default

Since you need to insert only one extra paragraph, and that too only occasionally, you can insert a blank paragraph above the newly inserted paragraph and restart numbering.

Of course, this will not work if you have more than one autonumbering list above the new paragraph. Otherwise it should do the trick. If I have not understood the problem, please clarify.

Quote:
Originally Posted by krazykaigh View Post
I tried to upload a file but the size restrictions would not let me upload a one-page sample. So I will try to be more clear.

I am using a .DOTX (Word 2007 Template). It is a complete document with bookmarked locations throughout it.

There are already Numbered paragraphs (like bullets but numbers). The numbered paras separate from the text paragraphs, like this:
START SAMPLE:

I
This is the first paragraph.
II
This is the second paragraph.
Now this could be the third paragraph but in may not be numbered.
III
Then another paragraph.

END SAMPLE

Now everything is properly spaced in the real document. The numbers are autonumbered, so if I remove one, the others automatically change, appropriately.

I think it will be easier to add numbers to particular bookmarks to look like it is properly numbered , rather than trying to get .range.applydefaultnumber to change the numbers.

I have tried so many combos but either a paragraph gets a new number added to it, and then inserts a new paragraph with the next number or some other unexpected outcome.

And, there is really only one paragraph that would need the number added. If someone wants a special distribution on their will, the program adds that paragraph. Normally they don't, so it doesn't add that paragraph.

Have I made this any more clear?

Kaigh

Last edited by Venky62 : July 31st 12 at 01:50 AM
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot restart numbered list in Word2007 Sean Microsoft Word Help 1 January 8th 10 07:09 PM
restart a numbered list in word 2007 Kim Microsoft Word Help 1 May 12th 09 02:55 PM
restart numbered list JRB Microsoft Word Help 1 August 21st 08 09:33 AM
Numbered Lists - Restart Numbering Helen Microsoft Word Help 17 August 11th 08 09:11 AM
Styles - how to restart numbered list? Jen Microsoft Word Help 3 May 16th 06 05:26 PM


All times are GMT +1. The time now is 01:33 AM.

Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright 2004-2023 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"