Microsoft KB Archive/183660

= XL98: LastUpdated Argument of Htmlconvert Is Not Functional =

Article ID: 183660

Article Last Modified on 6/17/2005

-

APPLIES TO


 * Microsoft Excel 98 for Macintosh

-



This article was previously published under Q183660



SYMPTOMS
When you programmatically create a Hypertext Markup Language (HTML) document with the Htmlconvert function, the value that you specify for the LastUpdated argument may not appear on the resulting HTML document.



CAUSE
This problem occurs if you do not include the DescriptionFullPage argument for the Htmlconvert function in your Visual Basic for Applications macro.



WORKAROUND
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. To specify a value for the LastUpdated argument without including a value for the DecscriptionFullPage argument of the Htmlconvert function, specify a null string ("") as the value for the DescriptionFullPage argument of the Htmlconvert function. The following example specifies a value for the LastUpdated argument without including a value for the DecscriptionFullPage argument:

 Close and save any open workbooks, and then create a new workbook. Enter the following values on Sheet1:

A1: 2

A2: 4

A3: 6

A4:

A5: This

A6: is

A7: a

A8: Test

 Select cells A1:A3, and then click Chart on the Insert menu. In the "Chart Wizard - Step 1 of 4 - Chart Type" dialog box, click Finish.

The result is a worksheet that contains two data ranges and one chart. Start the Visual Basic Editor (press OPTION+F11). To use the Htmlconvert method of the Internet Assistant Wizard add-in, create a reference to this add-in. To create the reference, follow these steps:

 On the Tools menu, click References.</li> Click to select the HTML check box, and then click OK.

Go to step 6.

If you do not see the HTML, in the Available References list, click Browse.</li>  Open the folder that contains the Internet Assistant Wizard file. By default, the Internet Assistant Wizard file is installed in the following folder: <pre class="fixed_text">         Microsoft Office 98:Office:Excel Add-ins </li> Click Microsoft Excel Files in the Files Of Type list.</li> Click Internet Assistant Wizard in the list of files, and then click Open.</li> Click OK to dismiss the References dialog box.</li></ol> </li> Click Module on the Insert menu to insert a Visual Basic module.</li>  Enter the following code into the module sheet: Sub CreateWebPage

Dim ObjToConvert(2) As Variant

' Populate the array of objects for HTMLConvert. Set ObjToConvert(0) = Sheets("sheet1").Range("a1:a3") Set ObjToConvert(1) = Sheets("sheet1").ChartObjects("Chart 1") Set ObjToConvert(2) = Sheets("sheet1").Range("a5:a8")

' Create the HTML document. Htmlconvert rangeandcharttoconvert:=ObjToConvert, _ usefrontpageforexistingfile:=False, _ addtofrontpageweb:=False, useexistingfile:=False, _ codepage:=1252, htmlfilepath:="Test.htm", _ descriptionfullpage:="", lastupdate:=Now

End Sub </li> Run the CreateWebPage subroutine.</li></ol>

When you open the Test.htm page in an Internet browser, text that indicates when the page was last updated appears at the bottom of the page.

<div class="status_section">

STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

<div class="moreinformation_section">

MORE INFORMATION
Note that the Htmlconvert function is not supported by the Html.xla add-in included with the original version of Microsoft Office 97. You must install Microsoft Office 97 SR-1 or download the updated Html.xla add-in from the Microsoft Web site in order to be able to use the Htmlconvert function.

For additional information about SR-1, please see the following article in the Microsoft Knowledge Base:

172475 OFF97: How to Obtain and Install MS Office 97 SR-1

Additional query words: XL98

Keywords: kbbug kbnofix kbprogramming KB183660

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.