General information
Category:
COM/DCOM and OLE Automation
Title:
General Field Save as File (Revisited)
OK, I lied. Thread 808042, Message 808093 did not solve my problem after all. The following code does not actually save any files to disk and does not produce any errors either:
IF !USED("lettype")
USE lettype
ELSE
SELECT lettype
ENDIF
SCAN
WAIT WINDOW "Refreshing " + ALLTRIM(lettype.letname) + "..." NOWAIT
ThisForm.oWord.Refresh()
ThisForm.oWord.Object.SaveAs(lettype.letname)
ENDSCAN
The .Object... does not show up in Intellisense, yet it does not produce any error or warning at runtime. What am I missing?
I would prefer avoiding the solution of creating a separate Word instance and cutting / pasting the General Field contents into it because that will not guarantee the other document properties will be applied (i.e. page orientation, etc.). Also, I would prefer not to use the solution that incororates low-level file handling with a 599 offset because it appears that will not always be valid. In addition, using binary memo fields or storing the files completely outside a table are pretty much out of the question at this point because of time and design constraints.
Why on Earth would MS create a General Field that will store files without providing a reasonable way of getting them back out? There must be an easier way to get these Word documents back out of the General Field. Anyone?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only