rico34 was telling us: rico34 nous racontait que :
Merci Jean-Guy pour ces infos. Et si je veux présenter quelque peu ces textes. Par exemple, en gras souligné, police "times new...", taille 14, centrée.
Si chaque paragraphe doit être différent:
'_______________________________________ With ActiveDocument.Range.Paragraphs(1) With .Item(1).Range .Text = "par1" & Chr(13) With .Font .Name = "Tahoma" .Size = 22 .Bold = True .Italic = False .Underline = wdUnderlineSingle End With With .ParagraphFormat .SpaceAfter = "12" .Alignment = wdAlignParagraphCenter End With End With With .Item(2).Range .Text = "par2" & Chr(13) With .Font .Name = "Tahoma" .Size = 12 .Bold = False .Italic = True .Underline = wdUnderlineDash End With With .ParagraphFormat .SpaceBefore = "18" .Alignment = wdAlignParagraphRight End With End With With .Item(3).Range .Text = "par3" & Chr(13) With .Font .Name = "Stencil" .Size = 15 .Color = wdColorSkyBlue .Bold = False .Italic = False .Underline = wdUnderlineDotDotDash End With With .ParagraphFormat .LeftIndent = CentimetersToPoints(2) .Alignment = wdAlignParagraphLeft End With End With End With '_______________________________________
Ou, si tous les paragraphes ont le même format:
'_______________________________________ With ActiveDocument With .Range.Paragraphs .Item(1).Range.Text = "par1" & Chr(13) .Item(2).Range.Text = "par2" & Chr(13) .Item(3).Range.Text = "par3" & Chr(13) End With With .Range(0, .Paragraphs(3).Range.End) With .Font .Name = "Tahoma" .Size = 12 .Bold = False .Italic = True .Underline = wdUnderlineDash End With With .ParagraphFormat .SpaceBefore = "18" .Alignment = wdAlignParagraphRight End With End With End With '_______________________________________
--
Salut! _______________________________________ Jean-Guy Marcil - Word MVP
Word MVP site: http://www.word.mvps.org
rico34 was telling us:
rico34 nous racontait que :
Merci Jean-Guy pour ces infos.
Et si je veux présenter quelque peu ces textes. Par exemple, en gras
souligné, police "times new...", taille 14, centrée.
Si chaque paragraphe doit être différent:
'_______________________________________
With ActiveDocument.Range.Paragraphs(1)
With .Item(1).Range
.Text = "par1" & Chr(13)
With .Font
.Name = "Tahoma"
.Size = 22
.Bold = True
.Italic = False
.Underline = wdUnderlineSingle
End With
With .ParagraphFormat
.SpaceAfter = "12"
.Alignment = wdAlignParagraphCenter
End With
End With
With .Item(2).Range
.Text = "par2" & Chr(13)
With .Font
.Name = "Tahoma"
.Size = 12
.Bold = False
.Italic = True
.Underline = wdUnderlineDash
End With
With .ParagraphFormat
.SpaceBefore = "18"
.Alignment = wdAlignParagraphRight
End With
End With
With .Item(3).Range
.Text = "par3" & Chr(13)
With .Font
.Name = "Stencil"
.Size = 15
.Color = wdColorSkyBlue
.Bold = False
.Italic = False
.Underline = wdUnderlineDotDotDash
End With
With .ParagraphFormat
.LeftIndent = CentimetersToPoints(2)
.Alignment = wdAlignParagraphLeft
End With
End With
End With
'_______________________________________
Ou, si tous les paragraphes ont le même format:
'_______________________________________
With ActiveDocument
With .Range.Paragraphs
.Item(1).Range.Text = "par1" & Chr(13)
.Item(2).Range.Text = "par2" & Chr(13)
.Item(3).Range.Text = "par3" & Chr(13)
End With
With .Range(0, .Paragraphs(3).Range.End)
With .Font
.Name = "Tahoma"
.Size = 12
.Bold = False
.Italic = True
.Underline = wdUnderlineDash
End With
With .ParagraphFormat
.SpaceBefore = "18"
.Alignment = wdAlignParagraphRight
End With
End With
End With
'_______________________________________
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
rico34 was telling us: rico34 nous racontait que :
Merci Jean-Guy pour ces infos. Et si je veux présenter quelque peu ces textes. Par exemple, en gras souligné, police "times new...", taille 14, centrée.
Si chaque paragraphe doit être différent:
'_______________________________________ With ActiveDocument.Range.Paragraphs(1) With .Item(1).Range .Text = "par1" & Chr(13) With .Font .Name = "Tahoma" .Size = 22 .Bold = True .Italic = False .Underline = wdUnderlineSingle End With With .ParagraphFormat .SpaceAfter = "12" .Alignment = wdAlignParagraphCenter End With End With With .Item(2).Range .Text = "par2" & Chr(13) With .Font .Name = "Tahoma" .Size = 12 .Bold = False .Italic = True .Underline = wdUnderlineDash End With With .ParagraphFormat .SpaceBefore = "18" .Alignment = wdAlignParagraphRight End With End With With .Item(3).Range .Text = "par3" & Chr(13) With .Font .Name = "Stencil" .Size = 15 .Color = wdColorSkyBlue .Bold = False .Italic = False .Underline = wdUnderlineDotDotDash End With With .ParagraphFormat .LeftIndent = CentimetersToPoints(2) .Alignment = wdAlignParagraphLeft End With End With End With '_______________________________________
Ou, si tous les paragraphes ont le même format:
'_______________________________________ With ActiveDocument With .Range.Paragraphs .Item(1).Range.Text = "par1" & Chr(13) .Item(2).Range.Text = "par2" & Chr(13) .Item(3).Range.Text = "par3" & Chr(13) End With With .Range(0, .Paragraphs(3).Range.End) With .Font .Name = "Tahoma" .Size = 12 .Bold = False .Italic = True .Underline = wdUnderlineDash End With With .ParagraphFormat .SpaceBefore = "18" .Alignment = wdAlignParagraphRight End With End With End With '_______________________________________
--
Salut! _______________________________________ Jean-Guy Marcil - Word MVP
Depuis vos dernières informations, je me suis posé d'autres questions, notamment Comment insérer un paragraphe avant le 1e paragraphe existant. Comment Supprimer le 1e paragraphe.
Encore un grand merci.
Bonjour,
Depuis vos dernières informations, je me suis posé d'autres questions,
notamment
Comment insérer un paragraphe avant le 1e paragraphe existant.
Comment Supprimer le 1e paragraphe.
Depuis vos dernières informations, je me suis posé d'autres questions, notamment Comment insérer un paragraphe avant le 1e paragraphe existant. Comment Supprimer le 1e paragraphe.
Encore un grand merci.
Geo
Bonjour,
Depuis vos dernières informations, je me suis posé d'autres questions, notamment Comment insérer un paragraphe avant le 1e paragraphe existant. Comment Supprimer le 1e paragraphe.
Dans ce cas, autant tout recomposer : Pour tout effacer les 3 paragraphes existants : Activedocument.Range(0, Activedocument.Paragraphs(3).Range.End).delete
puis faire la mise en forme comme vous l'a indiqué Jean-Guy.
-- A+
Bonjour,
Depuis vos dernières informations, je me suis posé d'autres questions,
notamment
Comment insérer un paragraphe avant le 1e paragraphe existant.
Comment Supprimer le 1e paragraphe.
Dans ce cas, autant tout recomposer :
Pour tout effacer les 3 paragraphes existants :
Activedocument.Range(0, Activedocument.Paragraphs(3).Range.End).delete
Depuis vos dernières informations, je me suis posé d'autres questions, notamment Comment insérer un paragraphe avant le 1e paragraphe existant. Comment Supprimer le 1e paragraphe.
Dans ce cas, autant tout recomposer : Pour tout effacer les 3 paragraphes existants : Activedocument.Range(0, Activedocument.Paragraphs(3).Range.End).delete