Code:
Sub Makro1() ' ' Makro1 Makro ' ' Dim a As String a = My.Computer.FileSystem.ReadAllText("C:\ems.txt") Selection.TypeText Text:="Hallo" Selection.MoveLeft Unit:=wdWord, Count:=1, Extend:=wdExtend ChangeFileOpenDirectory "C:\Users\krause\AppData\Roaming\Microsoft\Word\" ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:= _ "HYPERLINK", SubAddress:="", ScreenTip:="", TextToDisplay:="Hallo" End Sub
Woran liegt das ? Falls mit dem Objekt die emx.txt gemeint ist: Diese ist an der Stelle vorhanden und hat auch einen Inhalt.
Comment