word numbering prob

B

Balakumar

hi
i have the word doc contain 200 pages with heading style
1,2,3,4.
my vb program converts this word doc in to html pages.
each page seperated into single html file. the problem
was, once the conversation done the numbering re-assinged
in a HTML Pages. i need to maintain the numbers same as
word doc. how to do?

for ex:

in my WORD doc,

like in my first page contains the heading 1.1,1.2

in my second page contains 1.3.1.4,15

after the conversation as HTML page

the second page look like 1.1,1.2.1.3 like that.

and also i need that heading style for further action.

pls help me..

thanks
balakumar
 
S

Shauna Kelly

Hi Balakumar

Before converting to HTML, you can convert all numbering to text. To do that:
ActiveDocument.ConvertNumbersToText

However, bear in mind that this is a one-way street. You can't convert the numbers back into automatic numbering. So if you need to
use the Word document again, don't save it after you've converted the numbers to text.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
Melbourne, Australia
 
B

Balakumar

Hi

Thanks for the reply Shauna Kelly.

actualy my program read one word doc (cotain some 200+
pages) and taken single page and open a another word doc
and paste it and then save the new doc as HTML.

here the code,
objword - my main doc contain 200 pages
ObjwordTarget - my target word doc. which contain each
time one page. i am save this file to HTML.

Code:

Objword.ActiveDocument.Bookmarks("\page").Range.Copy
ObjwordTarget.Documents.Add.Content.Paste

ObjwordTarget.ActiveDocument.SaveAs
FileName:=txtTitlePath.Text & "Pages" & DocNum & ".HTM",
FileFormat:=wdFormatHTML

so it will go through the for loop. here i am converted
the objword doc to ConvertNumbersToText. but still the
HTML pages the numbers reassinged. pls help me..

Thanks
balakumar


-----Original Message-----
Hi Balakumar

Before converting to HTML, you can convert all numbering to text. To do that:
ActiveDocument.ConvertNumbersToText

However, bear in mind that this is a one-way street. You
can't convert the numbers back into automatic numbering.
So if you need to
 
S

Shauna Kelly

Hi Balakumar

You would have to convert the numbers before copying and pasting. Something like this:

1. Open the source document.
2. In the source document, convert all numbers to text.
3. Loop through the pages of the source document, getting each one's text. Copy and paste the text to a new document.
4. Close the source document without saving changes.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
Melbourne, Australia
 
B

Balakumar

Hi Shauna Kelly

Thanks for the reply Shauna Kelly.

i am converting all numbers to text before copying only.
still i didnt get the result.the pasted doc numbers get
re-assinged.what to do? pls help me..

Thanks
bala
-----Original Message-----
Hi Balakumar

You would have to convert the numbers before copying and pasting. Something like this:

1. Open the source document.
2. In the source document, convert all numbers to text.
3. Loop through the pages of the source document,
getting each one's text. Copy and paste the text to a new
document.
 
S

Shauna Kelly

Hi Bala

I don't think I can help you further. After you do ActiveDocument.ConvertNumbersToText, you should have no numbering information in
the document. It should be just text and should copy as text.

But ... make sure that the heading styles in the output document don't have numbering attached to their styles.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
Melbourne, Australia
 
B

Balakumar

Hi Shauna Kelly,

Thanks for the reply.

look at this article

http://support.microsoft.com/default.aspx?scid=kb;en-
us;119128

The same problem which i am facing in my program.

Thanks
balakumar
-----Original Message-----
Hi Bala

I don't think I can help you further. After you do
ActiveDocument.ConvertNumbersToText, you should have no
numbering information in
the document. It should be just text and should copy as text.

But ... make sure that the heading styles in the output
document don't have numbering attached to their styles.
 
S

Shauna Kelly

Hi balakumar

Can I suggest that you first try doing this manually? That is:

1. Open the source document.

2. In the Immediate Pane in the VBE, type ActiveDocument.ConvertNumbersToText and press Enter.

3. Go back to your source document. You should see the correct numbers in that source document. But they won't be automatic numbers
that update as you add or delete paragraphs.

4. Create a new document (the output document).

5. Copy some text from the source document.

6. Paste it into the output document.

In the output document, are the numbers correct?

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
Melbourne, Australia
 
B

Balakumar

Hi Shauna Kelly,

Thanks for the reply.

sorry. the numbers i mention was its heading levels. like
heading 1,heading 2,etc.

For ex:

In my first page i have contain

Heading 1 - some value
---- some text
---- some text
1. Heading 2 - some value
---- some text
---- some text
< ---- My first page over --- >

- here my second page
---- some text
---- some text
2. Heading 2 - some value


actuly i am doing this programmaticaly using vb. but i
tried it in manualy also. it wont work out. i write a one
macro using ActiveDocument.ConvertNumbersToText. after
the convertion i just copy the second page and paste it
to a new page.

it contain
---- some text
---- some text
1. Heading 2 - some value

- the 2 is changed to 1.

- i dont know where i am doing mistake.

Thanks for your help.

-Balakumar



-----Original Message-----
Hi balakumar

Can I suggest that you first try doing this manually? That is:

1. Open the source document.

2. In the Immediate Pane in the VBE, type
ActiveDocument.ConvertNumbersToText and press Enter.
3. Go back to your source document. You should see the
correct numbers in that source document. But they won't
be automatic numbers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top