delete duplicate line on every page 2

M

mihai

Doug Robbins code works but it has generated a new problem. My code is


'Ma intorc la inceputul documentului
Selection.HomeKey Unit:=wdStory
'Setez sourec si definesc selectia
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(findtext:="&k2S*&k0S", MatchWildcards:=True, _
Wrap:=wdFindContinue, Forward:=False) = True
'copiez selectia
Set arange = Selection.Range

......... a lot of code

'elimin linia dubla cu bezeichnung
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "( Bezei*^13)( Bezei*^13)"
.Replacement.Text = "\1"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Target.Close
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Loop
End With

The first loop works fin but after that Word gives the following erro
'5623' for the (Do While .Execute(findtext:="&k2S*&k0S"...)
"The Replace With text contains a group number which is out of range."
Why is this
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

Seems like you are trying to do a second find and replace within the first
find and replace loop and somewhere along the way, you seem to be creating a
separate document (Target.Close) and I am guessing that it is one this
document that the second find and replace is supposed to be acting. It's
not clear from the code that you have pasted that this second document is
actually the one that the code is acting upon. It might not be clear to
Word either and it probably loses its way as a result.

Tell us exactly what you are doing as there may be another way. Or at least
show us all of the code, then we might be able to tell if the above
assumptions are correct.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 
M

mihai

Yes your guess is right. Here is the whole code. Thanks for help.

Private Sub cmdExporttotal_Click()
'
' stuckliste Macro
' Macro created 06.11.2003 by Mihai Kovacs
'

On Error GoTo EROARE
GoTo START
'error mesage
EROARE:
MsgBox "Error number" & Err & ":" & Error(Err)
End

START:
Dim Source, Target As Document
Dim doc As Document
Dim arange, r As Range
Dim fname, nume, s, Status As String
'hide frmIntimpinare
Status = txtInput.Value
Unload frmIntimpinare
'Open document
ChDir "C:\Program Files\Reflection\User\Export"
Documents.Open FileName:="lpsd7ro2", ConfirmConversions:=False, _
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:=""
_
PasswordTemplate:="", Revert:=False, WritePasswordDocument:=""
_
WritePasswordTemplate:="", Format:=wdOpenFormatText
'Back to begining of document
Selection.HomeKey Unit:=wdStory
'Setez sourec si definesc selectia
'Set sourec = ActiveDocument
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(findtext:="&k2S*&k0S", MatchWildcards:=True, _
Wrap:=wdFindContinue, Forward:=False) = True
'copy selectia
Set arange = Selection.Range
'new document
Set Target = Documents.Add
'introducing the new selection in the new document
Target.Range.FormattedText = arange.FormattedText
'delete selection
arange.Delete
'preparing for name of doc - finding the product cod
Set doc = ActiveDocument
Set r = doc.Range
'finding product cod (begins always with 0 and has 12 numbers)
With r.Find
.Text = "0[0-9]{11}"
.MatchWildcards = True
.Execute
If .Found Then
's has the name of the product
s = r.Text
End If
End With
'START:
'Formating page
With ActiveDocument.PageSetup
.Orientation = wdOrientLandscape
.TopMargin = CentimetersToPoints(0.46)
.BottomMargin = CentimetersToPoints(0.5)
.LeftMargin = CentimetersToPoints(1)
.RightMargin = CentimetersToPoints(0.46)
.Gutter = CentimetersToPoints(0)
.HeaderDistance = CentimetersToPoints(0)
.FooterDistance = CentimetersToPoints(0)
.PageWidth = CentimetersToPoints(29.7)
.PageHeight = CentimetersToPoints(21)
End With
'Selecting all and font is 7
Selection.WholeStory
Selection.Font.Size = 7

'Finding 1flexibler insering new line once
Application.DisplayAlerts = wdAlertsNone
With Selection.Find
.Text = "1flexibler"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Find.Execute
Selection.HomeKey Unit:=wdLine
Selection.InsertBreak Type:=wdPageBreak
'Descend one page and a line for finding
Selection.GoTo What:=wdGoToPage, Which:=wdGoToFirst, Count:=2
Name:=""
Selection.Find.ClearFormatting
Selection.GoTo What:=wdGoToLine, Which:=wdGoToNext, Count:=1
Name:=""
Selection.Find.ClearFormatting
'Loop to find and insert page break
With ActiveDocument.Content.Find
Do While .Execute(findtext:="1flexibler", Forward:=True) = True
'Selection.WholeStory
With Selection.Find
.Text = "1flexibler"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
'Selection.Find.Execute
Selection.Find.Execute
Selection.HomeKey Unit:=wdLine
Selection.InsertBreak Type:=wdPageBreak
'Descend one line
Selection.GoTo What:=wdGoToLine, Which:=wdGoToNext, Count:=1
Name:=""
Selection.Find.ClearFormatting
Loop
'Go to end of the document
End With
Selection.EndKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
'Finding and deleting last two page breaks
With Selection.Find
.Text = "^m"
.Replacement.Text = ""
.Forward = False
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection
If .Find.Forward = True Then
.Collapse Direction:=wdCollapseStart
Else
.Collapse Direction:=wdCollapseEnd
End If
.Find.Execute Replace:=wdReplaceOne
If .Find.Forward = True Then
.Collapse Direction:=wdCollapseEnd
Else
.Collapse Direction:=wdCollapseStart
End If
.Find.Execute
End With
With Selection
If .Find.Forward = True Then
.Collapse Direction:=wdCollapseStart
Else
.Collapse Direction:=wdCollapseEnd
End If
.Find.Execute Replace:=wdReplaceOne
If .Find.Forward = True Then
.Collapse Direction:=wdCollapseEnd
Else
.Collapse Direction:=wdCollapseStart
End If
.Find.Execute
End With
'Back to begining
Selection.HomeKey Unit:=wdStory


'Delete &k2S
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(findtext:="&k2S", MatchWildcards:=True, _
Wrap:=wdFindContinue, Forward:=False) = True
'copy selection
Set arange = Selection.Range
'delete selectia
arange.Delete
Loop
End With
'delete end &k0S
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(findtext:="&k0S", MatchWildcards:=True, _
Wrap:=wdFindContinue, Forward:=False) = True
'copy selectia
Set arange = Selection.Range
'delete selectia
arange.Delete
Loop
End With
'save and close the new doc
Target.SaveAs FileName:="C:\Documents and Settings\user\My
Documents\Stuckliste\export\" & s _
& " status " & Status, WritePassword:="automotive",
ReadOnlyRecommended:=True

'delete duplicate line with bezeichnung
' Selection.HomeKey wdStory
' Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
' With Selection.Find
' .Text = "( Bezei*^13)( Bezei*^13)"
' .Replacement.Text = "\1"
' .Forward = True
' .Wrap = wdFindContinue
' .Format = False
' .MatchCase = False
' .MatchWholeWord = False
' .MatchAllWordForms = False
' .MatchSoundsLike = False
' .MatchWildcards = True
' End With
' Selection.Find.Execute Replace:=wdReplaceAll
' Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
Target.Close
' Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
Loop
End With
ActiveDocument.Close (False)
'Mesaj gata
MsgBox "Gata!", vbOKOnly, "Info"
Documents("Import stk.doc").Close False
End Sub
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

Please tell us in plain English (sorry, my French would not be up to it)
briefly what it is that you are trying to do. That will probably be easier
than trying to figure it out from your code. After all, if the code was
doing what you want, we would not even be discussing it.

Which document is intended to be the active document at the time you use

Set doc = ActiveDocument

If it is source or target, why not just use the relevant one of them rather
than create a new reference?

Then with

With ActiveDocument.PageSetup

what document are we referring to?

Then you break out into using Selection all over the place so it is little
wonder that Word got lost.

You will find your code much easier to debug if you indent each With End
WIth, Do Loop, If... Else...End If construction, as below, but having said
all of that, you might get away with putting a Source.Activate command
before the final Loop command after you close Target. No promises though.

Private Sub cmdExporttotal_Click()
'
' stuckliste Macro
' Macro created 06.11.2003 by Mihai Kovacs
'
On Error GoTo EROARE
GoTo START
'error mesage
EROARE:
MsgBox "Error number" & Err & ":" & Error(Err)
End
START:
Dim Source, Target As Document
Dim doc As Document
Dim arange, r As Range
Dim fname, nume, s, Status As String
'hide frmIntimpinare
Status = txtInput.Value
Unload frmIntimpinare
'Open document
ChDir "C:\Program Files\Reflection\User\Export"
Documents.Open FileName:="lpsd7ro2", ConfirmConversions:=False,
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="",
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="",
WritePasswordTemplate:="", Format:=wdOpenFormatText
'Back to begining of document
Selection.HomeKey Unit:=wdStory
'Setez sourec si definesc selectia
'Set sourec = ActiveDocument
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(findtext:="&k2S*&k0S", MatchWildcards:=True,
Wrap:=wdFindContinue, Forward:=False) = True
'copy selectia
Set arange = Selection.Range
'new document
Set Target = Documents.Add
'introducing the new selection in the new document
Target.Range.FormattedText = arange.FormattedText
'delete selection
arange.Delete
'preparing for name of doc - finding the product cod
Set doc = ActiveDocument
Set r = doc.Range
'finding product cod (begins always with 0 and has 12 numbers)
With r.Find
Text = "0[0-9]{11}"
MatchWildcards = True
Execute
If .Found Then
's has the name of the product
s = r.Text
End If
End With
'START:
'Formating page
With ActiveDocument.PageSetup
Orientation = wdOrientLandscape
TopMargin = CentimetersToPoints(0.46)
BottomMargin = CentimetersToPoints(0.5)
LeftMargin = CentimetersToPoints(1)
RightMargin = CentimetersToPoints(0.46)
Gutter = CentimetersToPoints(0)
HeaderDistance = CentimetersToPoints(0)
FooterDistance = CentimetersToPoints(0)
PageWidth = CentimetersToPoints(29.7)
PageHeight = CentimetersToPoints(21)
End With
'Selecting all and font is 7
Selection.WholeStory
Selection.Font.Size = 7
'Finding 1flexibler insering new line once
Application.DisplayAlerts = wdAlertsNone
With Selection.Find
Text = "1flexibler"
Replacement.Text = ""
Forward = True
Wrap = wdFindAsk
Format = False
MatchCase = False
MatchWholeWord = False
MatchWildcards = False
MatchSoundsLike = False
MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Find.Execute
Selection.HomeKey Unit:=wdLine
Selection.InsertBreak Type:=wdPageBreak
'Descend one page and a line for finding
Selection.GoTo What:=wdGoToPage, Which:=wdGoToFirst, Count:=2,
Name:=""
Selection.Find.ClearFormatting
Selection.GoTo What:=wdGoToLine, Which:=wdGoToNext, Count:=1,
Name:=""
Selection.Find.ClearFormatting
'Loop to find and insert page break
With ActiveDocument.Content.Find
Do While .Execute(findtext:="1flexibler", Forward:=True) = True
'Selection.WholeStory
With Selection.Find
Text = "1flexibler"
Replacement.Text = ""
Forward = True
Wrap = wdFindStop
Format = False
MatchCase = False
MatchWholeWord = False
MatchWildcards = False
MatchSoundsLike = False
MatchAllWordForms = False
End With
'Selection.Find.Execute
Selection.Find.Execute
Selection.HomeKey Unit:=wdLine
Selection.InsertBreak Type:=wdPageBreak
'Descend one line
Selection.GoTo What:=wdGoToLine, Which:=wdGoToNext,
Count:=1, Name:=""
Selection.Find.ClearFormatting
Loop
'Go to end of the document
End With
Selection.EndKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
'Finding and deleting last two page breaks
With Selection.Find
Text = "^m"
Replacement.Text = ""
Forward = False
Wrap = wdFindAsk
Format = False
MatchCase = False
MatchWholeWord = False
MatchWildcards = False
MatchSoundsLike = False
MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection
If .Find.Forward = True Then
Collapse Direction:=wdCollapseStart
Else
Collapse Direction:=wdCollapseEnd
End If
Find.Execute Replace:=wdReplaceOne
If .Find.Forward = True Then
Collapse Direction:=wdCollapseEnd
Else
Collapse Direction:=wdCollapseStart
End If
Find.Execute
End With
With Selection
If .Find.Forward = True Then
Collapse Direction:=wdCollapseStart
Else
Collapse Direction:=wdCollapseEnd
End If
Find.Execute Replace:=wdReplaceOne
If .Find.Forward = True Then
Collapse Direction:=wdCollapseEnd
Else
Collapse Direction:=wdCollapseStart
End If
Find.Execute
End With
'Back to begining
Selection.HomeKey Unit:=wdStory

'Delete &k2S
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(findtext:="&k2S", MatchWildcards:=True,
Wrap:=wdFindContinue, Forward:=False) = True
'copy selection
Set arange = Selection.Range
'delete selectia
arange.Delete
Loop
End With
'delete end &k0S
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(findtext:="&k0S", MatchWildcards:=True,
Wrap:=wdFindContinue, Forward:=False) = True
'copy selectia
Set arange = Selection.Range
'delete selectia
arange.Delete
Loop
End With
'save and close the new doc
Target.SaveAs FileName:="C:\Documents and Settings\user\My
Documents\Stuckliste\export\" & s & " status " & Status,
WritePassword:="automotive", ReadOnlyRecommended:=True
'delete duplicate line with bezeichnung
' Selection.HomeKey wdStory
' Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
' With Selection.Find
' .Text = "( Bezei*^13)( Bezei*^13)"
' .Replacement.Text = "\1"
' .Forward = True
' .Wrap = wdFindContinue
' .Format = False
' .MatchCase = False
' .MatchWholeWord = False
' .MatchAllWordForms = False
' .MatchSoundsLike = False
' .MatchWildcards = True
' End With
' Selection.Find.Execute Replace:=wdReplaceAll
' Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
Target.Close
' Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
Loop
End With
ActiveDocument.Close (False)
'Mesaj gata
MsgBox "Gata!", vbOKOnly, "Info"
Documents("Import stk.doc").Close False
End Sub

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
mihai said:
Yes your guess is right. Here is the whole code. Thanks for help.

Private Sub cmdExporttotal_Click()
'
' stuckliste Macro
' Macro created 06.11.2003 by Mihai Kovacs
'

On Error GoTo EROARE
GoTo START
'error mesage
EROARE:
MsgBox "Error number" & Err & ":" & Error(Err)
End

START:
Dim Source, Target As Document
Dim doc As Document
Dim arange, r As Range
Dim fname, nume, s, Status As String
'hide frmIntimpinare
Status = txtInput.Value
Unload frmIntimpinare
'Open document
ChDir "C:\Program Files\Reflection\User\Export"
Documents.Open FileName:="lpsd7ro2", ConfirmConversions:=False, _
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="",
_
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="",
_
WritePasswordTemplate:="", Format:=wdOpenFormatText
'Back to begining of document
Selection.HomeKey Unit:=wdStory
'Setez sourec si definesc selectia
'Set sourec = ActiveDocument
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(findtext:="&k2S*&k0S", MatchWildcards:=True, _
Wrap:=wdFindContinue, Forward:=False) = True
'copy selectia
Set arange = Selection.Range
'new document
Set Target = Documents.Add
'introducing the new selection in the new document
Target.Range.FormattedText = arange.FormattedText
'delete selection
arange.Delete
'preparing for name of doc - finding the product cod
Set doc = ActiveDocument
Set r = doc.Range
'finding product cod (begins always with 0 and has 12 numbers)
With r.Find
Text = "0[0-9]{11}"
MatchWildcards = True
Execute
If .Found Then
's has the name of the product
s = r.Text
End If
End With
'START:
'Formating page
With ActiveDocument.PageSetup
Orientation = wdOrientLandscape
TopMargin = CentimetersToPoints(0.46)
BottomMargin = CentimetersToPoints(0.5)
LeftMargin = CentimetersToPoints(1)
RightMargin = CentimetersToPoints(0.46)
Gutter = CentimetersToPoints(0)
HeaderDistance = CentimetersToPoints(0)
FooterDistance = CentimetersToPoints(0)
PageWidth = CentimetersToPoints(29.7)
PageHeight = CentimetersToPoints(21)
End With
'Selecting all and font is 7
Selection.WholeStory
Selection.Font.Size = 7

'Finding 1flexibler insering new line once
Application.DisplayAlerts = wdAlertsNone
With Selection.Find
Text = "1flexibler"
Replacement.Text = ""
Forward = True
Wrap = wdFindAsk
Format = False
MatchCase = False
MatchWholeWord = False
MatchWildcards = False
MatchSoundsLike = False
MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Find.Execute
Selection.HomeKey Unit:=wdLine
Selection.InsertBreak Type:=wdPageBreak
'Descend one page and a line for finding
Selection.GoTo What:=wdGoToPage, Which:=wdGoToFirst, Count:=2,
Name:=""
Selection.Find.ClearFormatting
Selection.GoTo What:=wdGoToLine, Which:=wdGoToNext, Count:=1,
Name:=""
Selection.Find.ClearFormatting
'Loop to find and insert page break
With ActiveDocument.Content.Find
Do While .Execute(findtext:="1flexibler", Forward:=True) = True
'Selection.WholeStory
With Selection.Find
Text = "1flexibler"
Replacement.Text = ""
Forward = True
Wrap = wdFindStop
Format = False
MatchCase = False
MatchWholeWord = False
MatchWildcards = False
MatchSoundsLike = False
MatchAllWordForms = False
End With
'Selection.Find.Execute
Selection.Find.Execute
Selection.HomeKey Unit:=wdLine
Selection.InsertBreak Type:=wdPageBreak
'Descend one line
Selection.GoTo What:=wdGoToLine, Which:=wdGoToNext, Count:=1,
Name:=""
Selection.Find.ClearFormatting
Loop
'Go to end of the document
End With
Selection.EndKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
'Finding and deleting last two page breaks
With Selection.Find
Text = "^m"
Replacement.Text = ""
Forward = False
Wrap = wdFindAsk
Format = False
MatchCase = False
MatchWholeWord = False
MatchWildcards = False
MatchSoundsLike = False
MatchAllWordForms = False
End With
Selection.Find.Execute
With Selection
If .Find.Forward = True Then
Collapse Direction:=wdCollapseStart
Else
Collapse Direction:=wdCollapseEnd
End If
Find.Execute Replace:=wdReplaceOne
If .Find.Forward = True Then
Collapse Direction:=wdCollapseEnd
Else
Collapse Direction:=wdCollapseStart
End If
Find.Execute
End With
With Selection
If .Find.Forward = True Then
Collapse Direction:=wdCollapseStart
Else
Collapse Direction:=wdCollapseEnd
End If
Find.Execute Replace:=wdReplaceOne
If .Find.Forward = True Then
Collapse Direction:=wdCollapseEnd
Else
Collapse Direction:=wdCollapseStart
End If
Find.Execute
End With
'Back to begining
Selection.HomeKey Unit:=wdStory


'Delete &k2S
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(findtext:="&k2S", MatchWildcards:=True, _
Wrap:=wdFindContinue, Forward:=False) = True
'copy selection
Set arange = Selection.Range
'delete selectia
arange.Delete
Loop
End With
'delete end &k0S
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(findtext:="&k0S", MatchWildcards:=True, _
Wrap:=wdFindContinue, Forward:=False) = True
'copy selectia
Set arange = Selection.Range
'delete selectia
arange.Delete
Loop
End With
'save and close the new doc
Target.SaveAs FileName:="C:\Documents and Settings\user\My
Documents\Stuckliste\export\" & s _
& " status " & Status, WritePassword:="automotive",
ReadOnlyRecommended:=True

'delete duplicate line with bezeichnung
' Selection.HomeKey wdStory
' Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
' With Selection.Find
' .Text = "( Bezei*^13)( Bezei*^13)"
' .Replacement.Text = "\1"
' .Forward = True
' .Wrap = wdFindContinue
' .Format = False
' .MatchCase = False
' .MatchWholeWord = False
' .MatchAllWordForms = False
' .MatchSoundsLike = False
' .MatchWildcards = True
' End With
' Selection.Find.Execute Replace:=wdReplaceAll
' Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
Target.Close
' Selection.Find.ClearFormatting
' Selection.Find.Replacement.ClearFormatting
Loop
End With
ActiveDocument.Close (False)
'Mesaj gata
MsgBox "Gata!", vbOKOnly, "Info"
Documents("Import stk.doc").Close False
End Sub
 
M

mihai

I have a document captured from printer. This document consist of one or
more list that have the following structure:

&k2S
1Flex

Code
011020020300

0
1
1
..2

Page break
1Flex

Code
011020020300

0
1
1
..2
&k0S

The beginning of the list is marked by “&k2S” and the end with “&k0S”.
Beginning the big loop “&k2S*&k0S”. I extract each separate list,
generate a new doc and past the list. Next in the new document I search
for the Code (it is a 12 digit number) that I will use as name to save
the doc. I format the pages and make the font 7. After that before each
“1Flex” I insert a page break. Next I delete the lines with “&k2S” and
“&k0S”. I save the new file with the name Code. Now I want to delete
the duplicate lines with “Bezei”.
Now I close this new document and make the Loop.
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

Hi Mihai,

Email a typical document to me and I will see what I can do. Use the
following as the subject of the message (I won't open it otherwise)

Re: delete duplicate line on every page 2 - TK2MSFTNGP08

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 
M

mihai

At the moment I'm abroad and I don't have the data by me. I will sen
you the mail on 08.03.04
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top