MS Office スイートで「最後にコピーした項目を保持しますか?」をオフにする

MS Office スイートで「最後にコピーした項目を保持しますか?」をオフにする

このポップアップには、最後にコピーした項目を保持すると終了に時間がかかる可能性があると書かれています。しかし、いずれの場合も、ポップアップをクリックする必要があると、別のポップアップ ボックスをクリックするためにマウスを移動する必要があるため、終了に時間がかかります。現実的に、コンピューターの速度が低下するほどコピーすることはありません (たとえ低下したとしても、終了に数秒余分にかかることは気になりません)。そのため、この「機能」を無効にしたいのですが、その方法が見つかりません。解決策を知っている人はいますか?

答え1

残念ながら、これをオフにすることはできません。このリクエストは「最後にコピーした項目を保持しますか?」ダイアログボックスを無効にするオプション- Uservoiceは、同じ質問あなたの質問は Microsoft のフォーラムで行われました。ただし、この回答を書いている時点では、Microsoft はこれを無効にするオプションを提供していません。

Microsoft のフォーラムにある唯一の回避策は、アプリを閉じる前に 1 文字をコピーすることです。

答え2

Dim wa オブジェクトとして

' オブジェクトを作成する前に

wa が Nothing の場合は、wa = CreateObject("word.application") を設定します。

終了の場合

' データをコピーして貼り付けた後

Wa.Quit False

設定は = なし

ポップアップが表示されないようにするには、これでうまくいきます

答え3

この AutoHotkey v2 スクリプトは問題を解決します。

最新バージョンは常に GitHub で見つかります:https://github.com/karolzlot/office-keep-last-item

バグに気付いた場合は、問題を報告してください。プルリクエストも歓迎します。

; This is AHK v2 script, it won't work on AHK v1.
#SingleInstance Force
#Warn   ; Enable warnings to assist with detecting common errors.
SendMode "Input"    ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir A_ScriptDir   ; Ensures a consistent starting directory.

SetTitleMatchMode(1) ; 1 = A window's title must start with the specified WinTitle to be a match.

; All translations can be found on https://www.microsoft.com/en-us/language/Search?&searchTerm=You%20placed%20a%20picture%20on%20the%20Clipboard.&langID=591&Source=true&productid=undefined

; English language
phrase1:= "You placed a picture on the Clipboard. Do you want this picture to be available to other applications after you quit"
phrase2:= "Do you want to keep the last item you copied?\n\nIf you do, it may take a bit longer to exit."
phrase_yes:= "Yes"

; ; Polish language
; phrase1:= "W Schowku znajduje się obraz. Czy ten obraz ma być dostępny dla innych aplikacji po zakończeniu pracy z programem"
; phrase2:= "Czy chcesz zachować ostatni skopiowany element?\n\nJeśli tak, zakończenie działania może potrwać trochę dłużej."
; phrase_yes:= "Tak"

Loop
{
    HWND := WinWaitActive("Microsoft ")
    window_text := WinGetText("ahk_id " HWND)

    if InStr(window_text, phrase1, "Off") or InStr(window_text, phrase2, "Off")
    {
        Controls := WinGetControls(HWND)
        for control in Controls
        {   
            MsgBox(control " " ControlGetText(control)) ; for debugging, comment out this line if it works ok
            if InStr(control, "Button") ; check if control is of type button
            {
                if InStr(ControlGetText(control), phrase_yes)
                {
                    MsgBox("Button found") ; for debugging, comment out  this line if it works ok
                    ControlClick(control)
                    Sleep(1000)
                    break
                }
            }
        }
    }
    else
    {
        ; MsgBox "Not found" ; for debugging, comment out this line if it works ok
        Sleep(1000)
    }
}

答え4

さらに言えば、なぜこれが存在するのでしょうか? 私たちのほとんどは、ハイパースレッド クアッドコア CPU と SSD ドライブを備えた 16G から 64G の RAM を搭載したマシンを使用しています。本当ですか? 保存時間が 1 ナノ秒長くなることを心配しているのですか? ユーザーが中断されるまでに、はるかに長い時間がかかります。この役に立たないポップアップが何であるかを理解し、OK をクリックします。削除するだけです。設定やオプションを増やすために時間を無駄にしないでください。意味がありません。

関連情報