Consulting

Results 1 to 6 of 6

Thread: Formatting Paragraphs

  1. #1
    Site Admin
    The Princess
    VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location

    Formatting Paragraphs

    Can someone *efficientize* this code?

    [vba]
    Sub Macro1()

    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=19
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Selection.TypeText Text:="(Da Acta de Reuni?o Ref? 1209.A.23) - """
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.MoveDown Unit:=wdLine, Count:=2, Extend:=wdExtend
    Selection.MoveRight Unit:=wdCharacter, Count:=8, Extend:=wdExtend
    Selection.Font.Size = 8
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Selection.Font.Size = 10
    Selection.TypeText Text:=""" - Sem Altera??o"
    Selection.MoveDown Unit:=wdLine, Count:=2
    Selection.MoveRight Unit:=wdCharacter, Count:=3
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.Copy
    Selection.MoveUp Unit:=wdLine, Count:=3
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=15
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.Paste
    Selection.MoveUp Unit:=wdLine, Count:=2
    Selection.MoveRight Unit:=wdCharacter, Count:=15
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.Paste
    End Sub
    [/vba]
    ~Anne Troy

  2. #2
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    I think we need a bit more information for all that cursor movement. It doesn't make a lot of sense stand-alone.
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  3. #3
    VBAX Tutor jamescol's Avatar
    Joined
    May 2004
    Location
    Charlotte, NC
    Posts
    251
    Location
    Quote Originally Posted by TonyJollans
    I think we need a bit more information for all that cursor movement. It doesn't make a lot of sense stand-alone.
    Whew! I'm glad to know it wasn't just me
    "All that's necessary for evil to triumph is for good men to do nothing."

  4. #4
    VBAX Regular JOrzech's Avatar
    Joined
    Jun 2004
    Location
    Upstate New York
    Posts
    83
    Location
    I'd be happy to help DB - but we need to know what you are trying to accomplish. It looks like the document has a specific format and certain wording in which you're adding Spanish text and changing fonts, copying and pasting... give us a clue?

    Dang nabit DB! Is this a test? :rofl
    Joanne

  5. #5
    Site Admin
    The Princess VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    Not a test.
    I'm just posting something I saw from somewhere else.
    We can delete it.
    I don't even remember where it was posted anymore.

    ~Anne Troy

  6. #6
    VBAX Regular JOrzech's Avatar
    Joined
    Jun 2004
    Location
    Upstate New York
    Posts
    83
    Location

    Not to worry....

    I thought you were just testing us you TaskMaster (hee hee)

    And I see you're making up your own words now... "efficientize"????

    You are too funny
    Joanne

Posting Permissions

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