Select the product you need help with
- Internet Explorer
- Windows Phone
- More products
WD2000: "Run-Time Error 4605: This Command Is Not Available" When You Use PageSetup Property
Article ID: 248644 - View products that this article applies to.
This article was previously published under Q248644
In Word 2000 Visual Basic for Applications (VBA), when you use the PageSetup property to retrieve page setup information, you receive the following error message:
Run-time error 4605: This command is not available.
This problem occurs when all of the following conditions are true:
To resolve this problem, obtain the latest service pack for Microsoft Office 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/276367/EN-US/ )OFF2000: How to Obtain the Latest Office 2000 Service Pack
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
(http://support.microsoft.com/default.aspx?scid=fh;en-us;cntactms)In your code, access the first paragraph in the section. Then retrieve the page setup information though the PageSetup object under the Paragraph.Range object. For example:
This macro steps through all sections in the document and displays the page orientation (0 for Portrait or 1 for Landscape) in a message box.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft Office 2000 Service Pack 2.
Steps to Reproduce the Problem