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
news:6F75B6AD-04A9-4356-86FC-(E-Mail Removed)...
> 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
>> news:63EF8FAC-1AAE-40BE-BF0B-(E-Mail Removed)...
>> > 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
>>
>>
>>
>>
>>
|