Modify

#3263 closed Bug (No Bug)

DocSaveAs does not output HTML file properly

Reported by: cbishop@… Owned by:
Milestone: Component: AutoIt
Version: 3.3.14.0 Severity: None
Keywords: Cc:

Description

The output of xlabs.html is a text file in IE/Chrome/Firefox, it seems HTML header information is missing.

Local $oAppl1 = _Word_Create()

$Filehandle = _Word_DocOpen($oAppl1, "
fred\xlabs.docx",Default, Default, True)

If @error = 1 Then

MsgBox(0, "FAILURE!", "Unable to Create the WORD Object")
Exit

ElseIf @error = 2 Then

MsgBox(0, "FAILURE!", "File xlabs Status Report does not exist")
Exit

EndIf

_Word_DocSaveAs($Filehandle,$TimelineFilePath & "\xlabs.html")

If @error Then MsgBox(0, "FAILURE", " Status Report was NOT Saved!", 3)

_Word_DocClose($Filehandle)

Attachments (0)

Change History (1)

comment:1 by BrewManNH, on Aug 24, 2016 at 2:39:11 AM

Resolution: No Bug
Status: newclosed

You're not saving it as an HTML file with that code, you're saving it as a Word document. Just because you name it with an HTML extension doesn't mean that it's going to save it as HTML. You need to add the file format parameter if you're saving it as something other than a Word document, in this case you need to use $WdFormatHTML as the file format parameter.

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.