I tried to get the path, copied by Win7-function of context menue "Copy Path" this path always comes to clipboard with quotation marks. I made a makro in Word where I dropped the marks off. Then I tried to do this in VBS and it won't work. In my test I found that not any text set between quotation marks is put back into the clipboard if I do this code. (simplified)
Dim string
' Get clipboard text
Set objHTML = CreateObject("htmlfile")
String= objHTML.ParentWindow.ClipboardData.GetData("text")
String = Left(String,2)
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "cmd.exe /c echo " & String & " | clip", 0, TRUE
works when text is not in quotation marks - only 2 chars left. put a text in marks in clipboard the whole string is put back into clipboard. is there any reason known?