WD2000: PublishObjects Property Not Supported in Microsoft Word (224714)



The information in this article applies to:

  • Microsoft Word 2000

This article was previously published under Q224714

SYMPTOMS

In Microsoft Word, when you attempt to create a macro to publish a Word document to a Web folder, by using similar commands from other Microsoft Office programs (such as Microsoft Excel or Microsoft PowerPoint), the commands are not available in Microsoft Word.

For example, in Microsoft Excel, you can use the PublishObjects property to publish a Microsoft Excel workbook to a Web folder.

NOTE: In Microsoft Excel, PublishObjects saves an item or a collection of items in a document to a Web page.

CAUSE

This functionality is by design of Microsoft Word. Word does not support the PublishObjects property in its object model.

RESOLUTION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers 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 requirements.
For more information about how to use the sample code in this article, click the article number below to view the article in the Microsoft Knowledge Base:

212536 OFF2000: How to Run Sample Code from Knowledge Base Articles

To save a Word document to a Web folder, use the SaveAs method. For example, use macro code similar to the following example
Sub test()
   ActiveDocument.SaveAs "http://<webservername>/test.doc", _
      FileFormat:=wdFormatHTML
End Sub
				
where <webservername> is the name of the Web server folder in which you want to save your Word document.

MORE INFORMATION

For more information about Web Folders, click Microsoft Word Help on the Help menu, type web folders in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.

Modification Type:MinorLast Reviewed:10/11/2006
Keywords:kbnofix kbprb KB224714