Modify

Opened 8 years ago

Closed 8 years ago

#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 Changed 8 years ago by BrewManNH

  • Resolution set to No Bug
  • Status changed from new to closed

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.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.