![]() |
#7
|
||||
|
||||
![]()
For a macro to clean up the text before processing, see: https://www.msofficeforums.com/word/...d-returns.html
VBA doesn't have the equivalent of 'Try', but you could add: On Error Resume Next after: With ActiveDocument Regarding the line objects, I suspect they're 'shapes', like autoshape lines, but without seeing the document I can't be sure. If they are, a macro could easily enough delete them, but I'd need to know whether there are other shapes that need to be preserved. As for your PowerPoint macro, you generally cannot simply copy & paste a macro from Word to PowerPoint, especially one produced by the macro recorder. The vba object models for the two applications are quite different. For example, without even considering whether PowerPoint's vba object model has the procedures you're trying to use, all the statements beginning with 'wd', like 'wdColorRed' are Word-specific.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
paragraph character |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Red Pill | Word | 5 | 05-25-2012 01:06 PM |
character set | bobster | Word | 0 | 06-07-2011 10:17 AM |
![]() |
carolinason | Word | 6 | 10-30-2010 06:45 PM |
Junk characters (box-like characters) in Word file | Sashikala | Word | 1 | 04-20-2010 02:03 PM |
Character style stripped while applying paragraph style | sams_gates | Word | 0 | 08-29-2009 02:03 AM |