Re: Centrare caractere
Scris: Lun Feb 03, 2014 2:02 pm
Rezultatul rularii este atasat
Forumul comunitatii romanesti a specialistilor Microsoft Excel din Romania
https://www.itlearning.ro/forum/
Cod: SelectaĊ£i tot
Sub findCapitol2()
'
'dr.word
'
'
Dim i As Integer
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Normal")
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Style = ActiveDocument.Styles("Heading 1")
With Selection.Find
.Text = "SEC?IUNEA"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
For i = 1 To ActiveDocument.Paragraphs.Count
If ActiveDocument.Paragraphs(i).Style = "Heading 1" Then
ActiveDocument.Paragraphs(i + 1).Style = "Heading 2"
End If
Next i
End Sub
Cod: SelectaĊ£i tot
Sub findCapitol2()
'
'dr.access
'
'
Dim i As Integer
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Normal")
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Style = ActiveDocument.Styles("Heading 1")
With Selection.Find
.Text = "SEC?IUNEA"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
For i = 1 To ActiveDocument.Paragraphs.Count
If ActiveDocument.Paragraphs(i).Style = "Heading 1" Then
ActiveDocument.Paragraphs(i + 1).Style = "Heading 2"
End If
Next i
With ActiveDocument.Styles("Heading 1").ParagraphFormat
.LeftIndent = CentimetersToPoints(0)
.RightIndent = CentimetersToPoints(0)
.SpaceBefore = 12
.SpaceBeforeAuto = False
.SpaceAfter = 12
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceSingle
.Alignment = wdAlignParagraphCenter
End With
With ActiveDocument.Styles("Heading 1")
.AutomaticallyUpdate = False
.BaseStyle = "Normal"
.NextParagraphStyle = "Normal"
End With
With ActiveDocument.Styles("Heading 2").ParagraphFormat
.LeftIndent = CentimetersToPoints(0)
.RightIndent = CentimetersToPoints(0)
.SpaceBefore = 12
.SpaceBeforeAuto = False
.SpaceAfter = 12
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceSingle
.Alignment = wdAlignParagraphCenter
End With
With ActiveDocument.Styles("Heading 2")
.AutomaticallyUpdate = False
.BaseStyle = "Normal"
.NextParagraphStyle = "Normal"
End With
End Sub
Multumesc, ma simt chiar magulita. Eu sunt Diana si am 41 de ani.Apostolu scrie:Dragul meu,)
Ei, aceasta e o informatie vitala!.. in plus, tot ce lucrez in Word, export in html.