Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word97 and HTML output
Message
De
12/11/1999 11:42:28
Donald Krasnick
Stanton Systems and Consulting
Havertown, Pennsylvanie, États-Unis
 
 
À
10/11/1999 21:01:28
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00289845
Message ID:
00290612
Vues:
12
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform