Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement,microsoft.public.word.vba.addins
Peter Karlström Peter Karlström is offline
external usenet poster
 
Posts: 6
Default Cutting and Pasting Numberd lists

Hi

I have developed a COM-Addin with a function which inserts text in a
document from another document (a type of template document).
The Addin shows a form in which the user choose the text from choices in a
database. The database states the file path and the bookmark from where to
get the text.
This works fine until we added numbered lists in the templates. (the
templates are ordinary doc-files with more than 1 numbered list).
The problem occurs when we cut and paste the second list in the template
document. The first list from the template works fine.
In the target document, number 1 in the list is lost and number 2 from the
template becomes number 1.
We have tried every possible way to format the lists in the template with no
success.

We get the same problem when we try this manually so we belive the problem
is not in the code, rather than in the formatting och either the template
document or the target document.

Is there anybody who has a clue?

--
Peter Karlström
Midrange AB
Sweden
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom Stefan Blom is offline
external usenet poster
 
Posts: 8,428
Default Cutting and Pasting Numberd lists

Have you considered pasting as unformatted text, which pastes autonumbers as
fixed numbers (as if they were typed in)?

--
Stefan Blom
Microsoft Word MVP


"Peter Karlström" wrote in message
...
Hi

I have developed a COM-Addin with a function which inserts text in a
document from another document (a type of template document).
The Addin shows a form in which the user choose the text from choices in a
database. The database states the file path and the bookmark from where to
get the text.
This works fine until we added numbered lists in the templates. (the
templates are ordinary doc-files with more than 1 numbered list).
The problem occurs when we cut and paste the second list in the template
document. The first list from the template works fine.
In the target document, number 1 in the list is lost and number 2 from the
template becomes number 1.
We have tried every possible way to format the lists in the template with
no
success.

We get the same problem when we try this manually so we belive the problem
is not in the code, rather than in the formatting och either the template
document or the target document.

Is there anybody who has a clue?

--
Peter Karlström
Midrange AB
Sweden





  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Peter Karlström Peter Karlström is offline
external usenet poster
 
Posts: 6
Default Cutting and Pasting Numberd lists

Hi Stefan

Yes we have, but the whole idea is that the people who administrate the
texts to use throughout the company can format the text as it should appear in
the final document, with format and all.

We have concider breaking up the template documents to several documents as
an escape route to the problem, but that makes the administration more
complicated, since we are talking about a severe number of texts.
The goal was to have one template document to each department.

Is this a known bug to Word?

Thanks in advance
--
Peter Karlström
Midrange AB
Sweden


"Stefan Blom" wrote:

Have you considered pasting as unformatted text, which pastes autonumbers as
fixed numbers (as if they were typed in)?

--
Stefan Blom
Microsoft Word MVP


"Peter Karlström" wrote in message
...
Hi

I have developed a COM-Addin with a function which inserts text in a
document from another document (a type of template document).
The Addin shows a form in which the user choose the text from choices in a
database. The database states the file path and the bookmark from where to
get the text.
This works fine until we added numbered lists in the templates. (the
templates are ordinary doc-files with more than 1 numbered list).
The problem occurs when we cut and paste the second list in the template
document. The first list from the template works fine.
In the target document, number 1 in the list is lost and number 2 from the
template becomes number 1.
We have tried every possible way to format the lists in the template with
no
success.

We get the same problem when we try this manually so we belive the problem
is not in the code, rather than in the formatting och either the template
document or the target document.

Is there anybody who has a clue?

--
Peter Karlström
Midrange AB
Sweden






  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom Stefan Blom is offline
external usenet poster
 
Posts: 8,428
Default Cutting and Pasting Numberd lists

I wouldn't call it a bug, exactly... The problem with pasting numbered items
from different sources is that it might be difficult to control which
numbered items are part of the same list and which are not. Especially note
that if numbering is applied with paragraph styles (which is the most stable
way), items of the same style are definitely part of the same list.

Instead of pasting as unformatted text you could convert the numbering to
text in the source documents before pasting it. That would preserve the
numbers (as typed-in characters), but still leave any other formatting
intact.

To convert the auto numbers in a range to text, run this macro:

Selection.Range.ListFormat.ConvertNumbersToText

(Note that I used Selection.Range, but you can specify a different range
object if you want to.)

And to convert all numbers in a document, run this macro:

ActiveDocument.ConvertNumbersToText

--
Stefan Blom
Microsoft Word MVP


"Peter Karlström" wrote in message
...
Hi Stefan

Yes we have, but the whole idea is that the people who administrate the
texts to use throughout the company can format the text as it should
appear in
the final document, with format and all.

We have concider breaking up the template documents to several documents
as
an escape route to the problem, but that makes the administration more
complicated, since we are talking about a severe number of texts.
The goal was to have one template document to each department.

Is this a known bug to Word?

Thanks in advance
--
Peter Karlström
Midrange AB
Sweden


"Stefan Blom" wrote:

Have you considered pasting as unformatted text, which pastes autonumbers
as
fixed numbers (as if they were typed in)?

--
Stefan Blom
Microsoft Word MVP


"Peter Karlström" wrote in message
...
Hi

I have developed a COM-Addin with a function which inserts text in a
document from another document (a type of template document).
The Addin shows a form in which the user choose the text from choices
in a
database. The database states the file path and the bookmark from where
to
get the text.
This works fine until we added numbered lists in the templates. (the
templates are ordinary doc-files with more than 1 numbered list).
The problem occurs when we cut and paste the second list in the
template
document. The first list from the template works fine.
In the target document, number 1 in the list is lost and number 2 from
the
template becomes number 1.
We have tried every possible way to format the lists in the template
with
no
success.

We get the same problem when we try this manually so we belive the
problem
is not in the code, rather than in the formatting och either the
template
document or the target document.

Is there anybody who has a clue?

--
Peter Karlström
Midrange AB
Sweden









  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Peter Karlström Peter Karlström is offline
external usenet poster
 
Posts: 6
Default Cutting and Pasting Numberd lists

Hi Stefan

Thanks for your reply.

With your suggestion it seems we have three ways to solve this:
1. Use your suggestion and convert the numbered lists to text.
2. Breake up the template document to only consist of 1 numbered list per
template.
3. Hard code som reformating after the paste in the target document.

I will let the customer to deside.

Thanks again

--
Peter Karlström
Midrange AB
Sweden


"Stefan Blom" wrote:

I wouldn't call it a bug, exactly... The problem with pasting numbered items
from different sources is that it might be difficult to control which
numbered items are part of the same list and which are not. Especially note
that if numbering is applied with paragraph styles (which is the most stable
way), items of the same style are definitely part of the same list.

Instead of pasting as unformatted text you could convert the numbering to
text in the source documents before pasting it. That would preserve the
numbers (as typed-in characters), but still leave any other formatting
intact.

To convert the auto numbers in a range to text, run this macro:

Selection.Range.ListFormat.ConvertNumbersToText

(Note that I used Selection.Range, but you can specify a different range
object if you want to.)

And to convert all numbers in a document, run this macro:

ActiveDocument.ConvertNumbersToText

--
Stefan Blom
Microsoft Word MVP


"Peter Karlström" wrote in message
...
Hi Stefan

Yes we have, but the whole idea is that the people who administrate the
texts to use throughout the company can format the text as it should
appear in
the final document, with format and all.

We have concider breaking up the template documents to several documents
as
an escape route to the problem, but that makes the administration more
complicated, since we are talking about a severe number of texts.
The goal was to have one template document to each department.

Is this a known bug to Word?

Thanks in advance
--
Peter Karlström
Midrange AB
Sweden


"Stefan Blom" wrote:

Have you considered pasting as unformatted text, which pastes autonumbers
as
fixed numbers (as if they were typed in)?

--
Stefan Blom
Microsoft Word MVP


"Peter Karlström" wrote in message
...
Hi

I have developed a COM-Addin with a function which inserts text in a
document from another document (a type of template document).
The Addin shows a form in which the user choose the text from choices
in a
database. The database states the file path and the bookmark from where
to
get the text.
This works fine until we added numbered lists in the templates. (the
templates are ordinary doc-files with more than 1 numbered list).
The problem occurs when we cut and paste the second list in the
template
document. The first list from the template works fine.
In the target document, number 1 in the list is lost and number 2 from
the
template becomes number 1.
We have tried every possible way to format the lists in the template
with
no
success.

We get the same problem when we try this manually so we belive the
problem
is not in the code, rather than in the formatting och either the
template
document or the target document.

Is there anybody who has a clue?

--
Peter Karlström
Midrange AB
Sweden









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
Problem with cutting/pasting using Ctrl shortcuts abbagirl Microsoft Word Help 9 May 16th 10 07:01 PM
Accepting 20 varied outlines, cutting & pasting into one long Perk Page Layout 2 October 1st 07 07:44 AM
move pages within a word doc without cutting & pasting Cherry Microsoft Word Help 2 March 29th 07 01:36 PM
Word crashes when cutting/pasting/reformatting a table Nicola Tables 0 June 28th 06 10:51 AM
Finding, cutting and pasting multiple words and paragraphs with ma Nexan Microsoft Word Help 6 March 2nd 05 05:49 PM


All times are GMT +1. The time now is 02:44 PM.

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

About Us

"It's about Microsoft Word"