+ Reply to Thread
Results 1 to 3 of 3

document.execCommand "Copy" has stopped working with Internet Explorer

  1. #1
    Registered User
    Join Date
    01-21-2015
    Location
    Edinburgh, Scotland
    MS-Off Ver
    2010
    Posts
    2

    document.execCommand "Copy" has stopped working with Internet Explorer

    Hello,

    We have to raise tickets for batch failures, which involves filling in fields on a webpage.
    To 'automate' this process, I wrote a macro which opens the web page (in I.E.), fills in the relevant fields, then copies the ticket number (from the web page) to my clipboard.

    I can then manually paste the ticket number into the application which alerted us about the failure.

    This worked perfectly for about a year, but suddenly the command which copies the ticket number to the clipboard has stopped working.

    ie.document.All("sys_readonly.incident.number").Select
    DoEvents
    ie.document.execCommand "Copy", False

    I just end up with a blank clipboard (or with the last thing I copied earlier in the day)

    The annoying thing is that it's still working perfectly for my colleagues.
    I haven't upgraded Internet Explorer, or installed any Windows updates recently.

    It's just such a weird thing, I haven't a clue how to fix it.

    I'd be grateful if someone could suggest a reason it's stopped working, or alternatively, some code that would replace those 3 lines above.

    Thanks.

  2. #2
    Registered User
    Join Date
    01-21-2015
    Location
    Edinburgh, Scotland
    MS-Off Ver
    2010
    Posts
    2

    Re: document.execCommand "Copy" has stopped working with Internet Explorer

    Problem solved. Got round it by...

    Dim alerttext As New DataObject
    incnum = ie.document.All("sys_readonly.incident.number").Value
    alerttext.SetText incnum
    alerttext.PutInClipboard

    ... which is a much cleaner way of doing it anyway.

  3. #3
    Registered User
    Join Date
    07-25-2016
    Location
    india
    MS-Off Ver
    2007
    Posts
    1

    Re: document.execCommand "Copy" has stopped working with Internet Explorer

    also having the same problem
    but finally i found the fix
    http://www.deskdecode.com/internet-e...opped-working/

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 06-10-2013, 06:18 PM
  2. VBA - IE - click on "Open" in an internet explorer "file download" window
    By victoire in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-22-2013, 07:08 AM
  3. Control Internet Explorer "File Download Pop Up Box"
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-18-2010, 11:36 AM
  4. "Export to Excel" doesn't appear in Internet Explorer
    By logicada in forum Excel General
    Replies: 1
    Last Post: 11-07-2005, 03:46 PM
  5. Missing "Export to Microsoft Excel" option in Internet Explorer
    By Donna YaWanna in forum Excel General
    Replies: 0
    Last Post: 06-29-2005, 08:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1