user_mobilelogo

Pour tout connaître sur Word
Nouvelle version !

600 pages !

9,80 € 

En savoir plus.

Voici un code qui permet également de mettre la taille du logo

 

Sub MonEnteteDocument()
'macro écrite par anacoluthe
Dim MonLogo As String
Dim oLogo As InlineShape
With Dialogs(wdDialogInsertPicture)
If .Display = 0 Then:   End
MonLogo = .Name
End With
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.ParagraphFormat.TabStops.ClearAll
With Selection
.ParagraphFormat.Alignment = wdAlignParagraphRight
Set oLogo = .InlineShapes.AddPicture(FileName:=MonLogo, _
LinkToFile:=False, SaveWithDocument:=True)
End With

 

La commande suivante non obligatoire permet de mettre une échelle au logo
With oLogo
.LockAspectRatio = msoTrue ' cette instruction est parfois ignorée
.Height = CentimetersToPoints(2)
.ScaleWidth = .ScaleHeight ' on force la même échelle 'inutile pour la v2007
End With

ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
Set oLogo = Nothing
End Sub

 

Voir aussi...

Statistiques

Aujourd'hui1086
Hier2750
Cette semaine6549
Ce mois67334
Total depuis 200414840311

30
visiteurs actuellement en ligne

29 mars 2023