Runtime error 4605 метод или свойство недоступны

При попытке использовать Microsoft Visual Basic for Applications (VBA) для изменения свойств документа появляется одно из приведенных ниже сообщений об ошибке.

Проблема

При попытке использовать Microsoft Visual Basic for Applications (VBA) для изменения свойств документа появляется одно из приведенных ниже сообщений об ошибке.

Ошибка при выполнении ‘4248’:

Команда недоступна, так как нет открытых документов

Ошибка при выполнении ‘4605’:
Метод или свойство недоступны, поскольку окно документа не активно

или

Ошибка при выполнении ‘5941’:
Запрашиваемый номер семейства не существует

Причина

Проблема возникает, когда нет открытых документов или не открыт документ, на который сделана ссылка. В программе Word предусмотрено изменение свойств только открытых документов.

Примечание. Такие сообщения об ошибках могут появиться также в том случае, если открыт документ, у которого свойство Видимый имеет значение Ложь.

Временное решение

Корпорация Microsoft предлагает примеры программного кода только для иллюстрации и не предоставляет явных или подразумеваемых гарантий относительно их корректной работы в конкретных случаях и в пользовательских приложениях. Примеры в данной статье рассчитаны на пользователя, имеющего достаточный уровень знаний соответствующего языка программирования, а также необходимых средств разработки и отладки. Специалисты служб технической поддержки Microsoft могут пояснить назначение тех или иных конструкций кода в конкретном примере, но модификация примеров и их адаптация к задачам разработчика не поддерживается. Если вам требуется дополнительная консультация по вопросам программирования, вы можете обратиться в службу консалтинга Microsoft или связаться с сертифицированными партнерами компании Microsoft. Дополнительную информацию о партнерах корпорации Microsoft можно найти в Интернете по следующему адресу:

http://www.microsoft.com/partner/referral/ За дополнительной информацией обратитесь к веб-узле корпорации Microsoft по адресу:

http://support.microsoft.com/default.aspx?scid=fh;RU;CNTACTMSЗа дополнительной информацией об использовании приведенных в этой статье примеров обратитесь к следующей статье Microsoft Knowledge Base:

290140 How to Run Sample Code from Knowledge Ниже приведен пример макроса на языке Visual Basic for Applications для изменения значения поля Заголовок в диалоговом окне Свойства. Пример содержит специальный программный код для перехвата ошибок на случай, если нет открытых документов, и вывода соответствующего сообщения.

Sub ChangeDocProperties()

On Error GoTo ErrHandler
ActiveDocument.BuiltInDocumentProperties("Title") = "My Title"
Exit Sub

ErrHandler:
If Err <> 0 Then
'
' Display an error message.
'
MsgBox Err.Description
'
' Clear the error.
'
Err.Clear
Resume Next

End If

End Sub

Приведенный ниже программный код предусмотрен для выполнения следующих целей.

  • Перехват ошибок, если нет открытых документов

    и

  • Создание нового документа при перехвате ошибки

    и

  • Возобновление нормальной работы в строке, вызвавшей появление ошибки

Sub ChangeDocProperties()

On Error GoTo ErrHandler
ActiveDocument.BuiltInDocumentProperties("Title") = "My Title"
Exit Sub

ErrHandler:
If Err <> 0 Then
'
' Add a document.
'
Documents.Add
'
' Clear the error.
'
Err.Clear
'
' Run the code that caused the error.
'
Resume

End If

End Sub

Ссылки

Для получения помощи по работе с Visual Basic обратитесь к следующей статье Microsoft Knowledge Base:

305326 Programming Resources for Visual Basic for Applications

Нужна дополнительная помощь?

Symptoms

When you try to use Microsoft Visual Basic for Applications (VBA) to change the properties of a document, you may receive one of the following error messages:

Run-time error ‘4248’:

This command is not available because no document is open.

Run-time error ‘4605’:
This method or property is not available because a document window is not active.

Run-time error ‘5941’:
The requested member of the collection does not exist.

Cause

This problem may occur if you do not have a document open, or if the document that you are referencing is not open. Word can only change the properties of an open (or visible) document.

Note These error messages may also appear if you open the document with the Visible property set to
False.

Workaround

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs.
If you have limited programming experience, you may want to contact a Microsoft Certified Partner or Microsoft Advisory Services. For more information, visit these Microsoft Web sites:

Microsoft Certified Partners — https://partner.microsoft.com/global/30000104

Microsoft Advisory Services — http://support.microsoft.com/gp/advisoryservice

For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS
For additional information about how to use the sample code that is included in this article, click the following article number to view the article in the Microsoft Knowledge Base:

290140 OFFXP: How to Run Sample Code from Knowledge Base Articles

The following sample VBA macros demonstrate how to change the value of the Title field in the
Properties dialog box. The following sample also includes code to trap the error, in case there are no documents open, and to display a message:

Sub ChangeDocProperties()

On Error GoTo ErrHandler
ActiveDocument.BuiltInDocumentProperties("Title") = "My Title"
Exit Sub

ErrHandler:
If Err <> 0 Then
'
' Display an error message.
'
MsgBox Err.Description
'
' Clear the error.
'
Err.Clear
Resume Next

End If

End Sub

The following sample macro includes code that will do the following:

  • Trap the error, in case there are no documents open.

  • In the error trap, create a new document.

  • Resume execution at the line that caused the error.

Sub ChangeDocProperties()

On Error GoTo ErrHandler
ActiveDocument.BuiltInDocumentProperties("Title") = "My Title"
Exit Sub

ErrHandler:
If Err <> 0 Then
'
' Add a document.
'
Documents.Add
'
' Clear the error.
'
Err.Clear
'
' Run the code that caused the error.
'
Resume

End If

End Sub

References

For additional information about how to get help with VBA, click the following article number to view the article in the Microsoft Knowledge Base:

305326 OFFXP: Programming Resources for Visual Basic for Applications

Need more help?

 

MrViper

Пользователь

Сообщений: 60
Регистрация: 01.01.1970

Excel 2010  

  Возникает ошибка 4605 — «Метод или свойства не доступны, поскольку буфер обмена пуст или содержит неверные данные» в VBA при ставки таблицы из Excel в Word такой строкой:  

  wordApp.Selection.PasteExcelTable False, False, False, где wordapp объект Word  

   Пробовал так — после ошибки код останавливаю, и пытаюсь через Ctrl+V вставить в Word — не выходит; такой ощущение что буфер пуст. Причем на листе Excel копируемая область показана (обведена мегающим диапазоном). НО! вставляю на любой лист Excel и чудесным образом буфер опять заполнился, но в word всталять все равно не хочет. Как быть?

 

MrViper

Пользователь

Сообщений: 60
Регистрация: 01.01.1970

Вот небольшой примерчик  
Повторясь  — Excel 2010

 

subtlety

Пользователь

Сообщений: 375
Регистрация: 01.01.1970

не очень понятно, там цикл.  

  Так работает:  

  Private Sub w_word_go()  

  Set wordApp = CreateObject(«word.application»)  
   wordApp.Visible = False   ‘False  
   wordApp.Documents.Add NewTemplate:=False, DocumentType:=0  
   Application.ScreenUpdating = False  

         ‘For i = 1 To 30  
       Range(Cells(1, 1), Cells(5, 10)).Copy  
       wordApp.Selection.PasteExcelTable False, False, False  
       wordApp.Selection.TypeParagraph  
   ‘Next i  

         Application.ScreenUpdating = True  
   wordApp.Visible = True  
End Sub

 

subtlety

Пользователь

Сообщений: 375
Регистрация: 01.01.1970

*зачем там цикл, я  имел в виду, конечно.

 

MrViper

Пользователь

Сообщений: 60
Регистрация: 01.01.1970

Просто ошибка возникает не всегда на первой вставки, иногда посредине, иногда и во все не возникает

 

KuklP

Пользователь

Сообщений: 14868
Регистрация: 21.12.2012

E-mail и реквизиты в профиле.

MrViper, у меня никакой ошибки не возникает. Хоть с циклом, хоть без. Значит, ошибка не в коде. С увеличением числа форумов, куда Вы запостили вопрос, шансы получить исправленный код не увеличатся. Кривая инсталляция Офиса, загнанная система и т.д..

Я сам — дурнее всякого примера! …

 

MrViper

Пользователь

Сообщений: 60
Регистрация: 01.01.1970

Не то чтобы получить исправленный код…скорее получить ответ, почему в 2003 офисе тот же код пашет, а в 2010 нет. У меня к Вам KukLP только 1 вопрос — Вы смотрели в 2010 офисе?

 

subtlety

Пользователь

Сообщений: 375
Регистрация: 01.01.1970

{quote}{login=MrViper}{date=15.02.2012 12:36}{thema=Re: }{post}{quote}{login=subtlety}{date=15.02.2012 12:16}{thema=}{post}*зачем там цикл, я  имел в виду, конечно.{/post}{/quote}  

  Просто ошибка возникает не всегда на первой вставки, иногда посредине, иногда и во все не возникает{/post}{/quote}  

  теперь понял.  

  после строки:  
wordApp.Selection.PasteExcelTable False, False, False  
добавьте очистку буфера.  
       Application.CutCopyMode = False  

  To KuklP. У меня тоже выскакивает эта ошибка и тоже нестабильно.  
собственно, по запросу «PasteExcelTable error 4605»  
google выдает много тредов.

 

MrViper

Пользователь

Сообщений: 60
Регистрация: 01.01.1970

Спасибо subtlety;    

  Информации на заметку — на машинах с разной производительности код ведет себя по разному, где пролетает, а где выдает ошибку

 

KuklP

Пользователь

Сообщений: 14868
Регистрация: 21.12.2012

E-mail и реквизиты в профиле.

Сейчас пять раз подряд запускал в 2010 без очистки буфера, с циклом. Все работает, ошибок нет. 150 проходов без ошибок.

Я сам — дурнее всякого примера! …

 

MrViper

Пользователь

Сообщений: 60
Регистрация: 01.01.1970

Незнаю…возможно зависит от конретной машины и параметров системы. Я протестировал на другом, более мощном компьютере, без очистки буфера — тоже все нормально. Замечу, что ошибка ругается на том что буфер пуст, а не переполнен. Т.е как бы таблица в буфере есть, но для Word’a ее нет. Загадка какая-то.  

  Но предлагаю закрыть тему, дабы не гадать на кофейной гуще. Решение subtlety показал.

 

subtlety

Пользователь

Сообщений: 375
Регистрация: 01.01.1970

#12

15.02.2012 15:07:23

Пожалуйста.  
Думаю, никакой загадки нет. Какая-то тонкость работы с буфером.  
Можно пошерстить англоязычные ресурсы.

Содержание

  1. You receive run-time error 4248, 4605 or 5941 when you try to change properties on an unopened document in Word
  2. Symptoms
  3. Cause
  4. Workaround
  5. References
  6. You receive run-time error 4248, 4605 or 5941 when you try to change properties on an unopened document in Word
  7. Symptoms
  8. Cause
  9. Workaround
  10. References
  11. При попытке использовать VBA для изменения свойств документа появляется сообщение об ошибке при выполнении 4248, 4605 или 5941
  12. Проблема
  13. Причина
  14. Временное решение
  15. Ссылки
  16. Microsoft visual basic runtime error 4605
  17. Asked by:
  18. Question
  19. All replies
  20. Microsoft visual basic runtime error 4605
  21. Asked by:
  22. Question
  23. All replies

You receive run-time error 4248, 4605 or 5941 when you try to change properties on an unopened document in Word

Symptoms

When you try to use Microsoft Visual Basic for Applications (VBA) to change the properties of a document, you may receive one of the following error messages:

Run-time error ‘4248’:

This command is not available because no document is open.

Run-time error ‘4605’:
This method or property is not available because a document window is not active.

Run-time error ‘5941’:
The requested member of the collection does not exist.

Cause

This problem may occur if you do not have a document open, or if the document that you are referencing is not open. Word can only change the properties of an open (or visible) document.

Note These error messages may also appear if you open the document with the Visible property set to
False.

Workaround

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs.
If you have limited programming experience, you may want to contact a Microsoft Certified Partner or Microsoft Advisory Services. For more information, visit these Microsoft Web sites:

For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS
For additional information about how to use the sample code that is included in this article, click the following article number to view the article in the Microsoft Knowledge Base:

290140 OFFXP: How to Run Sample Code from Knowledge Base Articles

The following sample VBA macros demonstrate how to change the value of the Title field in the
Properties dialog box. The following sample also includes code to trap the error, in case there are no documents open, and to display a message:

The following sample macro includes code that will do the following:

Trap the error, in case there are no documents open.

In the error trap, create a new document.

Resume execution at the line that caused the error.

References

For additional information about how to get help with VBA, click the following article number to view the article in the Microsoft Knowledge Base:

305326 OFFXP: Programming Resources for Visual Basic for Applications

Источник

You receive run-time error 4248, 4605 or 5941 when you try to change properties on an unopened document in Word

Symptoms

When you try to use Microsoft Visual Basic for Applications (VBA) to change the properties of a document, you may receive one of the following error messages:

Run-time error ‘4248’:

This command is not available because no document is open.

Run-time error ‘4605’:
This method or property is not available because a document window is not active.

Run-time error ‘5941’:
The requested member of the collection does not exist.

Cause

This problem may occur if you do not have a document open, or if the document that you are referencing is not open. Word can only change the properties of an open (or visible) document.

Note These error messages may also appear if you open the document with the Visible property set to
False.

Workaround

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs.
If you have limited programming experience, you may want to contact a Microsoft Certified Partner or Microsoft Advisory Services. For more information, visit these Microsoft Web sites:

For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS
For additional information about how to use the sample code that is included in this article, click the following article number to view the article in the Microsoft Knowledge Base:

290140 OFFXP: How to Run Sample Code from Knowledge Base Articles

The following sample VBA macros demonstrate how to change the value of the Title field in the
Properties dialog box. The following sample also includes code to trap the error, in case there are no documents open, and to display a message:

The following sample macro includes code that will do the following:

Trap the error, in case there are no documents open.

In the error trap, create a new document.

Resume execution at the line that caused the error.

References

For additional information about how to get help with VBA, click the following article number to view the article in the Microsoft Knowledge Base:

305326 OFFXP: Programming Resources for Visual Basic for Applications

Источник

При попытке использовать VBA для изменения свойств документа появляется сообщение об ошибке при выполнении 4248, 4605 или 5941

Проблема

При попытке использовать Microsoft Visual Basic for Applications (VBA) для изменения свойств документа появляется одно из приведенных ниже сообщений об ошибке.

Ошибка при выполнении ‘4248’:

Команда недоступна, так как нет открытых документов

Ошибка при выполнении ‘4605’:
Метод или свойство недоступны, поскольку окно документа не активно

Ошибка при выполнении ‘5941’:
Запрашиваемый номер семейства не существует

Причина

Проблема возникает, когда нет открытых документов или не открыт документ, на который сделана ссылка. В программе Word предусмотрено изменение свойств только открытых документов.

Примечание. Такие сообщения об ошибках могут появиться также в том случае, если открыт документ, у которого свойство Видимый имеет значение Ложь.

Временное решение

Корпорация Microsoft предлагает примеры программного кода только для иллюстрации и не предоставляет явных или подразумеваемых гарантий относительно их корректной работы в конкретных случаях и в пользовательских приложениях. Примеры в данной статье рассчитаны на пользователя, имеющего достаточный уровень знаний соответствующего языка программирования, а также необходимых средств разработки и отладки. Специалисты служб технической поддержки Microsoft могут пояснить назначение тех или иных конструкций кода в конкретном примере, но модификация примеров и их адаптация к задачам разработчика не поддерживается. Если вам требуется дополнительная консультация по вопросам программирования, вы можете обратиться в службу консалтинга Microsoft или связаться с сертифицированными партнерами компании Microsoft. Дополнительную информацию о партнерах корпорации Microsoft можно найти в Интернете по следующему адресу:

http://www.microsoft.com/partner/referral/ За дополнительной информацией обратитесь к веб-узле корпорации Microsoft по адресу:

http://support.microsoft.com/default.aspx?scid=fh;RU;CNTACTMSЗа дополнительной информацией об использовании приведенных в этой статье примеров обратитесь к следующей статье Microsoft Knowledge Base:

290140 How to Run Sample Code from Knowledge Ниже приведен пример макроса на языке Visual Basic for Applications для изменения значения поля Заголовок в диалоговом окне Свойства. Пример содержит специальный программный код для перехвата ошибок на случай, если нет открытых документов, и вывода соответствующего сообщения.

Приведенный ниже программный код предусмотрен для выполнения следующих целей.

Перехват ошибок, если нет открытых документов

Создание нового документа при перехвате ошибки

Возобновление нормальной работы в строке, вызвавшей появление ошибки

Ссылки

Для получения помощи по работе с Visual Basic обратитесь к следующей статье Microsoft Knowledge Base:

305326 Programming Resources for Visual Basic for Applications

Источник

Microsoft visual basic runtime error 4605

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Asked by:

Question

I wrote a script to add TAGs as comments of word document. The criteria of adding tag is based on outline numbering as document do not follow word styles, I had to use outline numbering for this purpose.

There are couple of issues I am facing.

1.) script is very slow and sometimes my word application crashes.

2.) sometimes I get a runtime error 4605 ‘This command is not available’ for line «Selection.Comments.Add Range:=Para.Range, text:=»[» & sIdLabel & sCurrentNumber & «]» & vbCrLf ‘ ID‘>»

Here is my updated code

Since you were not able to reproduce the error every time, I suspect this issue maybe relative to the context of document you were handling.

I am also trying to reproduce this issue in Word 2013 however failed. The code works well for me like figure below:

>>2.) sometimes I get a runtime error 4605 ‘This command is not available’ for line «Selection.Comments.Add Range:=Para.Range, text:=»[» & sIdLabel & sCurrentNumber & «]» & vbCrLf ‘ ID‘>»

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.

Источник

Microsoft visual basic runtime error 4605

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Asked by:

Question

I wrote a script to add TAGs as comments of word document. The criteria of adding tag is based on outline numbering as document do not follow word styles, I had to use outline numbering for this purpose.

There are couple of issues I am facing.

1.) script is very slow and sometimes my word application crashes.

2.) sometimes I get a runtime error 4605 ‘This command is not available’ for line «Selection.Comments.Add Range:=Para.Range, text:=»[» & sIdLabel & sCurrentNumber & «]» & vbCrLf ‘ ID‘>»

Here is my updated code

Since you were not able to reproduce the error every time, I suspect this issue maybe relative to the context of document you were handling.

I am also trying to reproduce this issue in Word 2013 however failed. The code works well for me like figure below:

>>2.) sometimes I get a runtime error 4605 ‘This command is not available’ for line «Selection.Comments.Add Range:=Para.Range, text:=»[» & sIdLabel & sCurrentNumber & «]» & vbCrLf ‘ ID‘>»

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.

Источник

Resolve Word 2013 Error 4605

As we all know that MS Word is the popular application that is used mainly for documentation purposes. It is widely used in sections like in office for business documentation, education, hospitals, and even small businesses to employ this amazing application. Files created in the word will be saved in two file formats Doc and Docx.  Previously MS word uses the native file format that is .doc. But, nowadays newer version uses .docx file format to store files.  Ms word 2013 is the most recent edition that has come up with upgraded and advanced features.

Besides having several enhancing features word 2013 has few minor issues also. When word document is being accessed on this latest edition, it generates few errors. One of the very noted errors that repeatedly occurred is “Runtime Error 4605 Word 2013”. So, today in this post, you will get a complete guide on how to fix this Word Runtime Error 4605 automatically or manually. So let’s start conquering….!

What Is Error ‘4605’ In Word 2013?

This terrible error occurs when the preferences of the Word tool are not set properly. One more reason for such issues is, because of Word file corruption. In case the Word 2013 file is severely corrupted then you confront such issues. In case the error is occurred due to the corruption of Word file, then one has to fix the document by making use of a repairing app.

This MS word 2013 run time error occurs when you try to open any word document, at the time you can get the below error message on your screen:

“Run-time error ‘4605’: The Unprotect method or property is not available because this command is not available for reading”.

REASON: The main reason behind the occurrence of this error is that word 2013 error preference of word tool and due to corruption of word file the same error can also get displayed as following.

“Run-time error ‘4605’: This method or property is not available because a document window is not active.”

REASON: This message usually pop-up while trying to do changes in the properties of a document using Microsoft VBA (Visual Basics for Applications).

“Run-time error ‘4605’: This method or property is not available because the current selection is at the end of a table row.”

REASON: The above error message will appear on word 2013 document when any excel sheet table is been tried to paste in word file.

(Automatic Way) How To Resolve Run-Time error 4605 on Word 2013?

Everyone who is facing this error with their word 2013 document it’s obvious to get panic as this error completely stops you to use any of your word documents. But you don’t need to get panic as this error can be fixed through easy steps. The MS Word Repair Tool is one of the best options using which you can try to fix the Word 2013 erroneous document in few simple clicks. It can also fix or resolve issues of word files like; Run-time error, not enough memory, encoding, error, macro error, cannot open a file, Invalid document, not responding, file permission error, and many more.

This tool can effectively repair DOC and DOCX file issues as it is well compatible with different versions of a word like; Word 2013, 2010, 2007, 2003, 2002, and 2001. It repairs several corrupted word document on memory cards, external hard drives, hard disk, USB drives, memory sticks, etc. The software is well compatible with all major versions of Windows OS including Windows 8, 7, Windows Vista, Windows XP, Windows 2003, and Windows 2008.

Steps to fix MS Word:

Step 1: Choose the file by clicking on a ‘Select File’ or either a folder that contains word files. Or even find the file clicking on the ‘Find File’ option.User guide step 1

Step 2: List of the selected files is displayed, the user requires selecting Word file using a checkbox that to be repaired. Select all files by marking the ‘Select All’ checkbox. Then click on the ‘Scan’ button.user guide step 2

Step 3: Preview of the scanned file could be seen by clicking on the file in both ‘Full document; and ‘Filtered text’ formats by clicking the tab given on the middle pane of the window.Word file

Step 4: If the scanned file is *.doc file, then the preview will be available in “Raw text” format all along with ‘Filtered Text’ formats and ‘Full Document’ and ‘Filtered Text’ formats.Word file

Step 5: To repair, users, must click on ‘Start Repair’. Then select options for saving file using ‘Save Document’ and hit ‘Ok’ button.Word file

Fix “4605 This Method Or Property Is Not Available Because This Command Is Not Available For Reading” Error Using Open & Repair Option

To repair corrupt Word file or fix MS word runtime error 4605, you can try an inbuilt MS Office feature. This advanced feature is quick and easy to fix minor issues. So, just try the steps mentioned below, to solve runtime error 4605 Word 2013:

  • Firstly, open the MS Word & tap on the File option.
  • Then click on Open
  • Next, navigate where your damaged MS Word file is located.
  • After that, choose a Word file & make a tap on down arrow near the Open
  • Lastly, press on ‘Open & Repair’option, and then MS Word will try to repair and open via removing its file issues.

Helpful Tips

  • Never change the preferences of your Word 2013 without having complete knowledge
  • Have a powerful antivirus software to get rid of the malicious viruses

Final Thoughts

Runtime Error 4605 Word 2013 Issue is a very common problem which can occur due to many reasons. I hope, now you’ll be able to fix the “this method or property is not available because the clipboard is empty or not validerror by applying the above-mentioned methods.

I hope, this post will surely help you out to repair runtime error 4605 Word 2016 with ease.

That’s it…

Steven Telfer is a senior writer at filerepairtool.net. He is a technology expert having over 4 years of experience and loves to write in different subjects like Video Repair, Microsoft Excel, QuickBooks, Word & others. He has a Master’s degree in Computer Application and has solve many technical problems. In free time, he loves to read books and do research work to grow in his field.

  • Remove From My Forums
  • Question

  • Hello everybody,

    at a customer’s site there are Word macros running since _decades_ just fine. One thing they do is copy the whole current document’s Range (into the Windows clipboard), create a new document, and Paste in the new document’s Range.

    Since a few weeks, the customer uses Office 365 (32 bit), and code like this fails:

    sourceRange.Copy()
    destinationRange.Paste()

    VBA stops with error 4605 on the Paste() call. We could somewhat help by inserting a DoEvents() between Copy() and Paste(). But this does not help always.

    What did change in Word’s handling of the clipboard so that something copied just one statement before cannot be pasted?


    Best Regards, Stefan Falk

    • Moved by

      Thursday, July 18, 2019 2:59 AM

Answers

  • Hello everybody!

    The problem is found and there is a workaround: Turn off clipboard history («Zwischenablage-Verlauf» in German)!

    The following little test macro runs just fine without clipboard history, but fails after just a few copy/paste iterations if clipboard history is turned on:

    Option Explicit
    
    Public Sub TestClipboard()
    
        Dim source As Document, target As Document, _
            text As String, _
            i As Integer
        
        For i = 1 To 1000
            text = text & "Dies ist ein Test. "
        Next
        Set source = Documents.Add
        source.Range.Text = text
        Set target = Documents.Add
        For i = 1 To 100
            Debug.Print i
            source.Range.Copy
            DoEvents
            target.Range.Paste
            DoEvents
        Next
        target.Close False
        source.Close False
        Debug.Print "Finished"
    
    End Sub
    

    So clipboard history seems to have at least one little problem.


    Best Regards, Stefan Falk

    • Marked as answer by
      Stefan Falk
      Wednesday, April 1, 2020 10:22 AM

  • Remove From My Forums
  • Question

  • Hello everybody,

    at a customer’s site there are Word macros running since _decades_ just fine. One thing they do is copy the whole current document’s Range (into the Windows clipboard), create a new document, and Paste in the new document’s Range.

    Since a few weeks, the customer uses Office 365 (32 bit), and code like this fails:

    sourceRange.Copy()
    destinationRange.Paste()

    VBA stops with error 4605 on the Paste() call. We could somewhat help by inserting a DoEvents() between Copy() and Paste(). But this does not help always.

    What did change in Word’s handling of the clipboard so that something copied just one statement before cannot be pasted?


    Best Regards, Stefan Falk

    • Moved by

      Thursday, July 18, 2019 2:59 AM

Answers

  • Hello everybody!

    The problem is found and there is a workaround: Turn off clipboard history («Zwischenablage-Verlauf» in German)!

    The following little test macro runs just fine without clipboard history, but fails after just a few copy/paste iterations if clipboard history is turned on:

    Option Explicit
    
    Public Sub TestClipboard()
    
        Dim source As Document, target As Document, _
            text As String, _
            i As Integer
        
        For i = 1 To 1000
            text = text & "Dies ist ein Test. "
        Next
        Set source = Documents.Add
        source.Range.Text = text
        Set target = Documents.Add
        For i = 1 To 100
            Debug.Print i
            source.Range.Copy
            DoEvents
            target.Range.Paste
            DoEvents
        Next
        target.Close False
        source.Close False
        Debug.Print "Finished"
    
    End Sub
    

    So clipboard history seems to have at least one little problem.


    Best Regards, Stefan Falk

    • Marked as answer by
      Stefan Falk
      Wednesday, April 1, 2020 10:22 AM

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Runtime error at 17 2161 out of range виндовс 10
  • Runtime error 4605 word
  • Runtime error at 168 4170 floating point divizion by zero
  • Runtime error 457
  • Runtime error at 166 500 division by zero

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии