Results 1 to 8 of 8
  1. #1
    2 Star Lounger
    Join Date
    Aug 2011
    Posts
    112
    Thanks
    35
    Thanked 3 Times in 3 Posts

    Word 2007 list numbering using VBA

    I have a PDF document which I have copied to a word document and pasted with formatted text.

    One thing it does not do is carry over the proper numbering scheme, instead, all the numbers are left aligned.

    If I highlight the text and choose Mutilist it seems to works part ways, but where there is a line that carry's over to the next line this line is numbered.

    Are there any VBA solution(s) which could automate a process like this?

    Attach is an example of the word document

    Thanks J~
    Attached Files Attached Files

  2. #2
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts
    Display the paragraph marks. You'll find that each line is set as a separate paragraph. Combine your physical paragraphs so that they match your logical paragraphs. Numbering should work.
    Charles Kyle Kenyon
    Madison, Wisconsin

  3. The Following User Says Thank You to Charles Kenyon For This Useful Post:

    jrb (2011-08-14)

  4. #3
    2 Star Lounger
    Join Date
    Aug 2011
    Posts
    112
    Thanks
    35
    Thanked 3 Times in 3 Posts
    Hi Charles,

    Thanks for the reply. Yes this is the strategy I saw too, but unfortunately the document is ~110 pages and this will take forever.

  5. #4
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts
    If your document has two paragraph marks between real paragraphs use replace to replace two paragraph marks with xxyxx and then single paragraph marks with nothing. Then replace xxyxx with one or two paragraph marks. The code for a paragraph mark in find/replace is ^p.

    BTW using converted text formatting for an important document that you intend to edit is a recipe for disaster. I generally use paste special - unformatted text - and apply styles to format. In the long run it is quicker and I get reliable results.

    Trying to address your problem w/ vba would make matters worse because your program would need to recognize what formatting you want when Word's conversion could not.
    Last edited by Charles Kenyon; 2011-08-14 at 10:37.
    Charles Kyle Kenyon
    Madison, Wisconsin

  6. #5
    WS Lounge VIP
    Join Date
    Mar 2006
    Location
    Maryland, USA
    Posts
    690
    Thanks
    17
    Thanked 66 Times in 56 Posts
    Your better bet is to try a free online pdf converter or perhaps an evaluation version of paid software. I often used several free online converters a few years ago, but never on a file as large as yours. I read today that pdf has been an open standard since 2008. So the newer converters should be pretty good. In fact, one of the ones I checked out today says you can choose editability over layout preservation.

    Pam
    Last edited by PamCaswell; 2011-08-14 at 13:59.

  7. The Following User Says Thank You to PamCaswell For This Useful Post:

    jrb (2011-08-14)

  8. #6
    2 Star Lounger
    Join Date
    Aug 2011
    Posts
    112
    Thanks
    35
    Thanked 3 Times in 3 Posts

    PDF to Word converter

    Thank you to both for your time.

    I used http://www.pdfonline.com which worked great

  9. #7
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    AutoFormat an option

    For future reference, you might get a good result using Autoformat. In Word 2007/2010 you can reach this through macro Word commands. Do it only on a copy of your document and you may have to fiddle with the options to get the best result. I had forgotten this because I generally manually reformat imported text.
    Last edited by Charles Kenyon; 2011-08-21 at 11:07. Reason: add title
    Charles Kyle Kenyon
    Madison, Wisconsin

  10. #8
    2 Star Lounger
    Join Date
    Aug 2011
    Posts
    112
    Thanks
    35
    Thanked 3 Times in 3 Posts
    Thanks Charles...never new that was there

Posting Permissions

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