![]() |
#1
|
|||
|
|||
![]()
Ok so I have a bunch of files that were created in word perfect and now have been converted into word. I need to find a way to use the replace all or a script function to add in the tabbing automatically.
I've attached a screen cap to this that shows on the top what I have and on the bottom what I want to convert to. If anyone can help point me in the right direction it would be much appreciated. Btw I have Word 2007. |
#2
|
||||
|
||||
![]()
Hi kapnasty,
Why do you want the tabs? It appears to me the paragraphs are all properly indented. If you add tabs, you'll have to remove the indenting to compensate, but then all lines after the first in each paragraph won't have any indenting.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Good question. Basically, these files are finding aids for researchers. Now the version up top without the tab arrows don't import correctly into microsoft access. The bottom version does import correctly into access and it allows us to provide researchers with additional services. Normally we could just go back and fix it but there are literally tens of thousands of pages that we would have to go through, and our staff is extremely small.
|
#4
|
||||
|
||||
![]()
Hi kapnasty,
For what you're asking, you'd probably need to use a macro to change the paragraphs from being indented to being tabbed. As different paragraphs have different levels of indenting, presumably you'd want the number of tabs to reflect that. The question then becomes: Do the indented paragraphs have particular Word paragraph Styles applied, to differentiate them from each other, or at least a consistent level of indenting, so that one can programmatically modify them?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
![]()
A macro would probably do it but since I am not very good at those I was looking to see if I could find some way to use the replace feature. The problem is identifying that indent as something that Word understands. Also the indents are all uniform (0.0, .38, .75 etc) but I haven't been able to use that yet. I feel like I'm close to finding the right recipe to make it work I was just hoping maybe someone could see something that I missed.
|
#6
|
||||
|
||||
![]()
If you can post back all of the indents, I can code a macro for you.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
![]()
Wow that'd be great thanks. So here are the indents:
0, .38, .75, 1.13, 1.5, 1.88, 2.25, 2.63, 3, 3.38, 3.75, 4.13, 4.5, 4.88, 5.25, 5.63, 6, 6.38 Thanks again. |
#8
|
||||
|
||||
![]()
Hi kapnasty,
Try the following macro: Code:
Sub IndentToTab() Dim oPara As Paragraph, i As Integer, StrInd StrInd = Split("0,0.38,0.75,1.13,1.5,1.88,2.25,2.63,3,3.38,3.75,4.13,4.5,4.88", ",") With ActiveDocument For Each oPara In .Paragraphs With oPara If .LeftIndent > 0 Then For i = 1 To UBound(StrInd) .Range.InsertBefore vbTab If .LeftIndent <= InchesToPoints(StrInd(i)) Then Exit For Next i .LeftIndent = 0 End If End With Next End With End Sub If you need to see how to install & run a macro, go to: http://www.gmayor.com/installing_macro.htm
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#9
|
|||
|
|||
![]()
Thanks for the help. It took me second to get it all figured out but I got it working now. It work sporadically but I think regardless we are going to have to just line by line review these documents. Thanks for trying though.
|
#10
|
||||
|
||||
![]()
Hi kapnasty,
If the code only works sporadically, that suggests your indenting is not consistent. If you find out what the other indents are, you could adjust them and re-run the macro.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Decimal tabs with space as thousands separator | harry | Word | 1 | 12-22-2023 02:59 PM |
Multiple IExplorer Tabs open with link | robertkjr3d | Outlook | 2 | 07-26-2010 11:30 AM |
Creating custom tabs for Word & Excel 2003 on a Windows 7 OS | Skarab | Office | 1 | 07-05-2010 09:23 AM |
Create Multiple Tabs from Template | TeePee | Excel | 0 | 04-30-2009 11:54 AM |
Adjusting Tabs | erselking | Word | 1 | 10-23-2008 02:57 PM |