fexco1
Goto Top

Include Picture bei Word 2010

Morgen Administrator-Gemeinde!

Ich stehe vor einem Problem was mir keine Ruhe lässt.

Gegeben ist ein Word 2010 auf einem Terminalserver.

Nun soll das Dokument ein Bild (Unterschrift) der jeweiligen Home-Ordner der Benutzer nehmen und einfügen.

Und hier ist das Problem:

Beispiel: "C:\Benutzer\MUSTERMANN\Unterschrift.jpg - Funktioniert tadellos!
"C:\Benutzer\%username%\Unterschrift.jpg - findet kein Bild. Wenn ich jedoch den Pfad im Explorer eingebe wird es sofort geöffnet.

Vielen Dank schonmal!

Content-Key: 304095

Url: https://administrator.de/contentid/304095

Printed on: April 25, 2024 at 08:04 o'clock

Mitglied: 129148
Solution 129148 May 10, 2016 updated at 13:30:51 (UTC)
Goto Top
Bild per Makro in Word 2000 einfügen

Sub InsertPicture()
    Dim img As InlineShape, shp As Shape
    Set img = Selection.InlineShapes.AddPicture(Environ("USERPROFILE") & "\Unterschrift.jpg")  
    Set shp = img.ConvertToShape
    shp.WrapFormat.Type = wdWrapNone
End Sub