Hallo
Ich brauche einen Programmierer der etwas VBA/VBS kann. Problem: aus einem Word bzw. Excel dokument ein executable file auf einem server aufrufen. Also beim Oeffnen des Microsoft Dokuments.
Besten Dank
Druckbare Version
Hallo
Ich brauche einen Programmierer der etwas VBA/VBS kann. Problem: aus einem Word bzw. Excel dokument ein executable file auf einem server aufrufen. Also beim Oeffnen des Microsoft Dokuments.
Besten Dank
Hier wird dir geholfen:
VBA - randomscripts.org
So hab ichs in meinem letzten Projekt gemachtZitat:
WScript.Interactive = falseOn Error Resume Next
ServerShare = "\\Dein Netzlaufwerk"
Set NetworkObject = CreateObject("WScript.Network")
Set FSO = CreateObject("Scripting.FileSystemObject")
NetworkObject.MapNetworkDrive "", ServerShare, False
Set Directory = FSO.GetFolder(ServerShare)
Set objShell = WScript.CreateObject("WScript.Shell")
currentFolder = objShell.CurrentDirectory
destinationFolderPath = objShell.ExpandEnvironmentStrings("%temp%") & "\BeliebigerOrdnerName"
If FSO.FolderExists(destinationFolderPath) then
FSO.DeleteFolder(destinationFolderPath)
WScript.Sleep 1000
End if
FSO.CreateFolder destinationFolderPath
FSO.CopyFile currentFolder & "" & "Deine.exe" , destinationFolderPath & ""
dim shell
set shell=createobject("wscript.shell")
shell.Run destinationFolderPath & "" & "Deine.exe"