Jump to content

How to save *.doc content in sqlite blob field using AutoIt?


Recommended Posts

You can use a Rich Edit text control (_GUICtrlRichEdit_Create) to display a Word doc saved as a Rich Text Format document and it will display as such in the GUI.   The file can be stored anywhere so I don't see why a blob would not work.  That said, if you are asking can it be a DOC file ... I don't think so.  I think the Word file would need to be saved as an RTF.  Alternatively, you could open it in Word from a UI control if Word were installed on the machine running your app.   I am not aware of a COM object for viewing Word docs in the GUI but that could be another .doc approach if there were such an object that could be embedded.  I did see a thread where they tried to create an embedded browser object in the GUI, then put the doc into "web view mode", then display it in the browser object.  Others may have a better approach or more info on the Word object options for embedding.  

#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiRichEdit.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 437, 192, 124)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

$fileName; Yor RTF file
$file=FileOpen(@DesktopDir&"\"&$fileName); or wherver you place your text file
$contents=FileRead($file)
$edit=_GUICtrlRichEdit_Create($Form1,$contents, 48, 40, 497, 345); create Rich Edit control and populate with file contents

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

 

Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...