Pied de page personnalisé

Boostez vos compétences Excel avec notre communauté !

Rejoignez Excel Downloads, le rendez-vous des passionnés où l'entraide fait la force. Apprenez, échangez, progressez – et tout ça gratuitement ! 👉 Inscrivez-vous maintenant !

momo2394

XLDnaute Occasionnel
Bonjour le forum

Comment changer la taille le style et la police, je voudrais du Batang en gras et en 16


Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim hts
Dim rbm
hts = Range("O4").Text
rbm = Range("R6").value
ActiveSheet.PageSetup.RightFooter = hts
ActiveSheet.PageSetup.CenterFooter = rbm
End Sub

Merci
 
Re : Pied de page personnalisé

salut tiens cela met en gras avec une police de 16

With Selection.Font ' change selection par ta case range("case").Font
.Name = "Calibri"
.FontStyle = "Gras"
.Size = 16 ' taille de la police
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.ThemeFont = xlThemeFontMinor
End With

cordialement
 
Re : Pied de page personnalisé

mettre en gras et la police est une méthode qui s'applique à une cellule
donc dans ton code fait
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim hts
Dim rbm
hts = Range("O4").Text
rbm = Range("R6").value
ActiveSheet.PageSetup.RightFooter = hts
ActiveSheet.PageSetup.CenterFooter = rbm


With Range("O4").Font
.Name = "Calibri"
.FontStyle = "Gras"
.Size = 16 ' taille de la police
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.ThemeFont = xlThemeFontMinor
End With
End Sub

et cela met ta cellule en police 16 et en gras
 
Re : Pied de page personnalisé

Salut Yohan

Merci, mais tu pourra constater que dans la mise en page la taille est en '10' et le style 'normal' et la police 'Arial'
en faite c'est par défaut mais moi je la veux en '16' & 'Gras' & 'Batang'
est ce possible?

Merci
 

Pièces jointes

Re : Pied de page personnalisé

Bonjour,

A partir de la demande du post #1:
Code:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim hts
Dim rbm
hts = Range("O4").Text
rbm = Range("R6").Value
ActiveSheet.PageSetup.RightFooter = "&""Batang""&B&16" & hts
ActiveSheet.PageSetup.CenterFooter = "&""Batang""&B&16" & rbm
ActiveSheet.PrintPreview
End Sub

A+
 
Re : Pied de page personnalisé

Salut HASCO

Tout d’abord Merci, mais il ya un big prob regarde le PDF
le "range R6" ok en revanche le "range O4" petit souci

Merci
 

Pièces jointes

Re : Pied de page personnalisé

autrement voici le code

Selection.Font.Bold = True
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = "&""Arial,Gras""&16bonjour"
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.7)
.RightMargin = Application.InchesToPoints(0.7)
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.75)
.HeaderMargin = Application.InchesToPoints(0.3)
.FooterMargin = Application.InchesToPoints(0.3)
.Zoom = 100
.PrintErrors = xlPrintErrorsDisplayed
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.ScaleWithDocHeaderFooter = True
.AlignMarginsHeaderFooter = True
.EvenPage.LeftHeader.Text = ""
.EvenPage.CenterHeader.Text = ""
.EvenPage.RightHeader.Text = ""
.EvenPage.LeftFooter.Text = ""
.EvenPage.CenterFooter.Text = ""
.EvenPage.RightFooter.Text = ""
.FirstPage.LeftHeader.Text = ""
.FirstPage.CenterHeader.Text = ""
.FirstPage.RightHeader.Text = ""
.FirstPage.LeftFooter.Text = ""
.FirstPage.CenterFooter.Text = ""
.FirstPage.RightFooter.Text = ""
End With
Application.PrintCommunication = True
 
- Navigue sans publicité
- Accède à Cléa, notre assistante IA experte Excel... et pas que...
- Profite de fonctionnalités exclusives
Ton soutien permet à Excel Downloads de rester 100% gratuit et de continuer à rassembler les passionnés d'Excel.
Je deviens Supporter XLD

Discussions similaires

Retour