![]() So, Word (at least in the newer versions) is capable to open a plain html-file directly C:\temp\TestDocument.html (in the above right-hand-part of the ScreenShot, opened with IE) C:\temp\ (in the above left part of the ScreenShot, opened with Word) Note, that the above example spits out two (identical) files, which differ only in their ending: OpenTextFile("C:\temp\", 2, 1).Write Join(HtmlArr, vbCrLf)įunction CreateFld(ID, LabelText, EditText, Optional ByVal SpellCheck As Boolean, Optional Style$) As String OpenTextFile("C:\temp\TestDocument.html", 2, 1).Write Join(HtmlArr, vbCrLf) With CreateObject("Scripting.FileSystemObject") 'write two identical files Here is an example of a Word Document with editable Plain Text Content Controls (these are editable fields in the actual Word Doc, and shown in bold red below).Īny suggestions on how to know which Plain Text Content Control is which so I can 'fill' them programmatically, yet keep the controls editable if I send the Document to someone? My goal is to have pre-prepared (data already populated) EDITABLE documents (using the Plain Text Content Controls).įlds.Add CreateFld("txt1", "Name (First and Last):", "Enter First and Last Name")įlds.Add CreateFld("txt2", "Street Address/Apt:", "Enter Street Address")įlds.Add CreateFld("txt3", "City:", "Enter City")įlds.Add CreateFld("txt4", "State:", "Enter State")įlds.Add CreateFld("txt5", "Zip:", "Enter ZipCode")įlds.Add CreateFld("txt6", "Phone-Number:", "Enter Phone-Number")ĭim i: For i = 1 To Flds.Count: HtmlArr(i) = Flds(i): Next What I would LIKE to do is, instead of using 'regular' Word docs, use a template I created to populate the Plain Text Content Controls directly with VB6 code, pulling from data in my Access tables. ![]() I also can create (manually) in MS Word (using the Developer Tab) Plain Text Content Controls, which allow someone to take the Word document and click on the control and type in the appropriate information. I also use Access tables from which to pull data and then code in VB6 where those items may go in a Word Document. I know how to create MS Word Documents using VB6.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |