ankur3020
asked on
asking permission
when i am running the followinf vbs file it pop up message as attached.
Set objIE = CreateObject("InternetExpl orer.Appli cation")
objIE.Navigate("about:blan k")
objIE.document.parentwindo w.clipboar dData.SetD ata "text", ""
objIE.Quit
I WANT THE CODE SHOULD RUN WITHOUT ANY POP/PERMISSION. WHAT CHANGES REQUIRED TO DO SO.
popup.jpeg
Set objIE = CreateObject("InternetExpl
objIE.Navigate("about:blan
objIE.document.parentwindo
objIE.Quit
I WANT THE CODE SHOULD RUN WITHOUT ANY POP/PERMISSION. WHAT CHANGES REQUIRED TO DO SO.
popup.jpeg
Probably, it is prohibited by IE's security option.
ASKER
pls give vbs code to omit this
ASKER
if i want to use notepad instead of word ,make changes required in following code.
' Set what you want to put in the clipboard '
strMessage = "Imagine that, it works!"
' Declare an object for the word application '
Set objWord = CreateObject("Word.Applica tion")
' Using the object '
With objWord
.Visible = False ' Don't show word '
.Documents.Add ' Create a document '
.Selection.TypeText strMessage ' Put text into it '
.Selection.WholeStory ' Select everything in the doc '
.Selection.Copy ' Copy contents to clipboard '
.Quit False ' Close Word, don't save '
End With
' Set what you want to put in the clipboard '
strMessage = "Imagine that, it works!"
' Declare an object for the word application '
Set objWord = CreateObject("Word.Applica
' Using the object '
With objWord
.Visible = False ' Don't show word '
.Documents.Add ' Create a document '
.Selection.TypeText strMessage ' Put text into it '
.Selection.WholeStory ' Select everything in the doc '
.Selection.Copy ' Copy contents to clipboard '
.Quit False ' Close Word, don't save '
End With
It is not possible to do it from notepad, because there is not application object for notepad.
I suggest you use a freeware utility called NIRCMD:
http://www.nirsoft.net/utils/nircmd.html
the you can use it to set the cliboard:
nircmd.exe clipboard set "Hello World!"
I suggest you use a freeware utility called NIRCMD:
http://www.nirsoft.net/utils/nircmd.html
the you can use it to set the cliboard:
nircmd.exe clipboard set "Hello World!"
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
dear , i know in one of your experts answer he told me to close above permission. but when i asked him about the code to close that instead of manual way, i did not get response for long time. so i thought let me ask a fresh question.
anyway, i followed his idea and able to do it but again the question is still there. i want to enable "allow programmatic clipboard access" in scripting of internet security with vbs code.
pls help me to provide it.. can i do the same with registry dwrod key. ?
anyway, i followed his idea and able to do it but again the question is still there. i want to enable "allow programmatic clipboard access" in scripting of internet security with vbs code.
pls help me to provide it.. can i do the same with registry dwrod key. ?
all three questions in the list I posted provide the answer to your question using registry settings or other way
but you ignored them and ask the same question 4th time ....
but you ignored them and ask the same question 4th time ....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.