Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement,microsoft.public.word.vba.addins
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem with cutting/pasting using Ctrl shortcuts | Microsoft Word Help | |||
Accepting 20 varied outlines, cutting & pasting into one long | Page Layout | |||
move pages within a word doc without cutting & pasting | Microsoft Word Help | |||
Word crashes when cutting/pasting/reformatting a table | Tables | |||
Finding, cutting and pasting multiple words and paragraphs with ma | Microsoft Word Help |