Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word97 and HTML output
Message
From
12/11/1999 12:55:11
 
 
To
12/11/1999 11:42:28
Donald Krasnick
Stanton Systems and Consulting
Havertown, Pennsylvania, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00289845
Message ID:
00290647
Views:
11
The literal value of the constant wdFormatHTML is 8. You can find the values of Office constants in the VBA editor's object browser, by typing in the name of the constant in the search window.


>Now I'm getting somewhere. I went to several machines that had Word97 installed and opened a document and then saved it as a HTML file. This is the typical macro I would see recorded:
>
>ActiveDocument.SaveAs
> FileName:="test.htm",
> FileFormat:=100,
> LockComments =False....etc.
>
>The key is that on my machine, it recorded "100" as the "FileFormat", but on others it recorded either "102" or "114". On Word2000, it recorded "wdFormatHTML".
>
>I've tried looking at the registry for these values (looking for "HTML32"), but haven't found anything yet.
>
>Any clues?
>
>Don
>
>
>
>>>I'm opening "template" documents in Word, substituting data using bookmarks, and then writing the data out as an HTML file (for preview) or a DOC file (for actual printing).
>>>
>>>The problem is that sometimes the HTML output works fine (properly formatted tables, font characteristics, etc.) but at other times it produces "plain" ASCII text - no HTML formatting whatsoever. The problem seems to depend on the actual installation of Word97 on each machine.
>>>
>>>Anybody seen this?
>>>
>>>The code looks something like this:
>>>
>>> llLockComments = .F.
>>> lcPassword = ""
>>> llAddToRecentFiles = .F.
>>> lnFormat = 100
>>> lcOutfile = "foobar.htm"
>>> loWord.Application.ActiveDocument.SaveAs(lcOutFile, lnFormat, llLockComments, lcPassword, llAddToRecentFiles)
>>>
>>>Note that the value of "100" for the format was obtained by performing the same task manually with the Macro Recorder on. If I try this in Word2000, I use a value of "8" (wdFormatHTML). I haven't repeated this experiment with Word2000, since its not installed on several machines (yet).
>>>
>>>Thanks for any help...
>>>
>>>Don
>>
>>I would first chack that the HTML convertor was installed on the suspect machines.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform