+ Reply to Thread
Results 1 to 3 of 3

Formatting paragraphs after entry

  1. #1
    Forum Contributor
    Join Date
    03-05-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    301

    Formatting paragraphs after entry

    Hi All.

    I have created some code that reviews an entire document and formats paragraphs that contain quotes.
    e.g.

    "Hello World"

    Hello World
    I am wondering how it may be possible to format a paragraph when pressing enter - or entering into a new paragraph, such that my paragraphs immediately apply formatting on enter.

    I can't find an inbuilt subroutine that detects onexit (such as excel has).

    Cheers

  2. #2
    Forum Contributor
    Join Date
    03-05-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    301

    Re: Formatting paragraphs after entry

    I have solved this issue, following a few rabbit holes, this is the result.

    In the document module enter this
    Please Login or Register  to view this content.
    Create a class module called EventClassModule

    Please Login or Register  to view this content.
    The code wont run by exiting the paragraph, however, the class event will trigger whenever re-entering the paragraph. So you can type your sentence including the "Quote", and exit the sentence. Re-enter it to apply the formatting.

    Someone else may know of a more practical solution or a more efficient way to code this, but it may help someone else.

    Cheers

  3. #3
    Forum Contributor
    Join Date
    10-30-2019
    Location
    Bistrita, Romania
    MS-Off Ver
    2019; 365
    Posts
    231

    Re: Formatting paragraphs after entry

    Thanks for the feedback on this.
    It might help me with something.
    To show your appreciation
    Click ★ Add reputation!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Get unique paragraphs
    By ImranBhatti in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-23-2019, 01:02 AM
  2. Format of text in to paragraphs
    By censura10 in forum Excel General
    Replies: 2
    Last Post: 05-27-2018, 01:51 PM
  3. Typing paragraphs in Excel - Help!
    By helphelpme in forum Excel General
    Replies: 1
    Last Post: 06-03-2014, 12:18 PM
  4. ListParagraphs und Paragraphs
    By MBorn in forum Word Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2011, 02:28 AM
  5. Concatenation with paragraphs - please help
    By shotputjuggler in forum Excel General
    Replies: 2
    Last Post: 06-20-2009, 03:47 AM
  6. Formatting cells so I can copy paragraphs
    By breenan in forum Excel General
    Replies: 1
    Last Post: 10-06-2007, 04:18 PM
  7. Replies: 5
    Last Post: 04-20-2006, 01:50 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1