Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Oct 2006
    Location
    Orlando, Florida, USA
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Copy Paste from IE to Word(2003), re-style text, m (Word 2003)

    I am working with a team that has created a web application (javascript with oracle back end). One of its functions is to auto-generate a document based on a pre-defined template - using a custom Style. We currently copy the text (stored as HTML in Oracle) from IE and paste it into the Word document. It pastes successfully with all formatting intact, but does not pick up the new Style. When we change the Style, all/most of the text formatting is lost.

    More detail:
    The text is coming from a web application (IE), using the FCKeditor (http://www.fckeditor.net/) - which provides RTF boxes for the report's body text to be entered into and formatted (i.e. bold, italics, underline, bulleted lists, numbered lists, indents, text justification, etc.). The RTF text is stored in Oracle as HTML. When it comes time for report generation, the text (RTF) is copied from IE and pasted into MS Word 2003.

    The text then needs to be re-styled (in MS Word 2003) to meet an internal Document Service Department's template requirement, which is called "0". It is similar to "Normal", but has 0 indent, Arial 11pt, and controls the spacing before and after a paragraph. The reason Doc Services created this "Style" was that it produces the best document in the end when converted to a PDF. This is a defined process, by our Document Service Group, we must submit in Word, and they convert (and password protect) the documents into PDF.

    We can successfully paste the text into Word, from IE, and it has all of its formatting intact (i.e. bold, italics, underline, bullets, indents, justification, etc.) - and it will typically paste in as style "Normal" or "Normal(Web)". When the text is re-styled to "0", we lose bulleting, text justification, and in some cases also the other text formatting (bold, italics, etc.). We have tried changing the default "paste" option to paste in style=0, but we still lose bullets, center justification, and indents. We also tried creating a style "0" in the web-based text editor in hopes that Word would recognize the style, but we were not successful with that either (it was not recognized
    in Word).

    Any help you could provide on how to paste in the text, re-style it to "0", and maintain all formatting (bold, italics, underline, bullet lists, indents, justification, etc.) would be greatly appreciated.

    In summary: Is it possible to copy text from IE into Word (2003), re-style in Word, and retain the formatting? Please help.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Copy Paste from IE to Word(2003), re-style text, m (Word 2003)

    Welcome to Woody's Lounge!

    I fear that your requirements are contradictory. When you apply a paragraph style to a paragraph, that paragraph takes on the paragraph formatting aspects of the style, such as alignment, indentation, bullets and numbering. If the paragraph were to keep its original paragraph format, what would be the use of applying a style?

    It's different for character formatting (font, font size, color, bold etc.). If you apply a paragraph style to an entire paragraph, character formatting should be preserved, unless it takes up more than half the paragraph. So if a word here and there has been made bold, this should be preserved, but if the majority of the paragraph is bold, applying the style will unbold the text. If you apply a paragraph style to part of a paragraph, it acts as a character style, and it will override all direct character formatting.

    I don't think there is an easy solution or workaround for this.

  3. #3
    New Lounger
    Join Date
    Oct 2006
    Location
    Orlando, Florida, USA
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy Paste from IE to Word(2003), re-style text, m (Word 2003)

    Hans,

    I really appreciate you answering. I fear you are correct, in that there is not a simple solution. One thing we are looking at is parsing the data, so that lists and justified text (center, mostly) will maintain their "style", and the bulk of the text will take on the required "0". We have had limited success with this.

    Do you know if it is possible to create a 'style' in an editor that MS Word would recognize/utilize when copied from IE into Word2003? We are investigating other text editors, so we are open to suggestions for alternatives to the fckedit.

    Again, thank you for your comments.

    John

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Copy Paste from IE to Word(2003), re-style tex

    Word has a special affinity for proprietary HTML markup. In many cases, this is a headache, but in your case, it might be an advantage. Try exporting a correctly formatted document from Word to HTML and check out the way in which styles are stored and applied to specific paragraphs. You might be able to wrap these around the contents of your database field in such a manner that Word automatically applies the 0 style. Or maybe Word won't be fooled... I think it's worth a try.

  5. #5
    New Lounger
    Join Date
    Oct 2006
    Location
    Orlando, Florida, USA
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Copy Paste from IE to Word(2003), re-style tex

    Jscher2000,

    We are going to give that a try. I did a quick check, and it appears to have mostly fooled Word. More testing/tweaking and time will tell. Thanks so much for the suggestion. The text editor has a style "importer", too - I am going to try to take all the style definitions from word and create a CSS from them, then create a "style" in the IE text editor from there. This may help to further simplify the process. I'll let you know how it goes.

    Thanks again,
    John

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •