Nom Utilisateur VBA powerpoint

Résolu/Fermé
thefloflo64 Messages postés 650 Date d'inscription jeudi 13 novembre 2014 Statut Membre Dernière intervention 28 novembre 2017 - 14 janv. 2016 à 15:02
thefloflo64 Messages postés 650 Date d'inscription jeudi 13 novembre 2014 Statut Membre Dernière intervention 28 novembre 2017 - 15 janv. 2016 à 13:37
Bonjour,

Je voudrais une macro qui récupérerait le nom d'ulisateur connecté afin de l'afficher sous forme de texte sur la première page d'un diaporama.
Est-ce que quelqu'un sait comment faire cela ?


Cordialement,
Florian
A voir également:

3 réponses

cs_Le Pivert Messages postés 7903 Date d'inscription jeudi 13 septembre 2007 Statut Contributeur Dernière intervention 11 mars 2024 728
14 janv. 2016 à 18:22
1
thefloflo64 Messages postés 650 Date d'inscription jeudi 13 novembre 2014 Statut Membre Dernière intervention 28 novembre 2017 93
15 janv. 2016 à 09:03
Bonjour

C'est parfait merci


Cordialement,
Florian
0
cs_Le Pivert Messages postés 7903 Date d'inscription jeudi 13 septembre 2007 Statut Contributeur Dernière intervention 11 mars 2024 728
15 janv. 2016 à 11:08
Si cela t’intéresse; j'ai fait un programme sous Excel pour créer un Diaporama rapidement:

https://codes-sources.commentcamarche.net/source/49191-diaporama-powerpoint-depuis-excel

Bonne programmation
0
thefloflo64 Messages postés 650 Date d'inscription jeudi 13 novembre 2014 Statut Membre Dernière intervention 28 novembre 2017 93
15 janv. 2016 à 13:37
Voici pour ceux que cela interesse le code que j'ai adapté en fonction de mes besois :

Private Sub Auteur()
Dim x As Long
Dim MyOBJ As Object
Set MyOBJ = GetObject("WinMgmts:").instancesOf("Win32_NetworkLoginProfile")
On Error Resume Next
Debug.Print "BEGIN ===================================="

Set mybox = ActivePresentation.Slides(1).Shapes.AddTextbox( _
Orientation:=msoTextOrientationHorizontal, _
Left:=1, _
Top:=250, _
Width:=720, _
Height:=100).TextFrame.TextRange

For Each objItem In MyOBJ
MyMsg = MyMsg & objItem.FullName
Next

With ActivePresentation.BuiltInDocumentProperties
For x = 1 To .Count
Debug.Print "Property Number: " & CStr(x)
Debug.Print "Property Name: " & .Item(x).Name
Debug.Print "Property Value: " & .Item(x).Value
Next
With ActivePresentation
mybox.Text = MyMsg
End With

mybox.Font.Bold = msoFalse
mybox.Font.Size = 20
mybox.Font.Name = "Calibri"
mybox.Font.Color.RGB = RGB(110, 132, 193)
mybox.ParagraphFormat.Alignment = ppAlignCenter



Debug.Print "END ===================================="
End With
End Sub



Cordialement,
Florian
-1