Board index » Visual Studio » VB6 to Word, saving as Word Perfect format?

VB6 to Word, saving as Word Perfect format?

Visual Studio242
Is there a way to have VB6 create a Word document, and then save it in Word

Perfect format? I need to create a WP document for a client (nothing fancy,

just text) but I don't have WP. I know Word can save as a WP doc, but is it

possible to automate this process from VB6?


-
 

Re:VB6 to Word, saving as Word Perfect format?

Dave wrote:

Quote
Is there a way to have VB6 create a Word document, and then save it

in Word Perfect format? I need to create a WP document for a client

(nothing fancy, just text) but I don't have WP. I know Word can save

as a WP doc, but is it possible to automate this process from VB6?



Take a look at the FileConverters collection of the Application object...



For Each conv In FileConverters

If conv.FormatName = "WordPerfect 6.x" Then

MsgBox "WordPerfect 6.0 converter is installed"

End if

Next conv



You can use those in the FileFormat argument for SaveAs. Something like:



ActiveDocument.SaveAs _

FileFormat:=FileConverters([key]).SaveFormat



See the help for SaveFormat for more details.



Later... Karl

--

Working Without a .NET?

classicvb.org/petition">classicvb.org/petition





-

Re:VB6 to Word, saving as Word Perfect format?



"Dave" <Dave@discussions.microsoft.com>wrote in message

Quote
Is there a way to have VB6 create a Word document, and then save it in

Word

Perfect format? I need to create a WP document for a client (nothing

fancy,

just text) but I don't have WP. I know Word can save as a WP doc, but is

it

possible to automate this process from VB6?





It appears so. Look up the FileConverters collection and FileConverter

object, as well as the SaveAs method, in Word's VBA Help. Here's a quote

from Word 2003's VBA Help for the FileFormat argument of the SaveAs method:



"Other File Types To save in a file type for which there isn't a constant,

use the FileConverters object to obtain the SaveFormat property; then set

the FileFormat argument to the value of the SaveFormat property."



If you need more help, you'd probably be better off asking in a Word-related

newsgroup such as "microsoft.public.word.vba.general". You might be writing

this in VB6, but it's the Word object library you're using so a Word

newsgroup would be better.



--

Mike

Microsoft MVP Visual Basic





-

Re:VB6 to Word, saving as Word Perfect format?

Thank you, gentlemen. That's the info I was looking for.



-

Re:VB6 to Word, saving as Word Perfect format?

If the WP document is just text why not just save it as a Word document and

let the user open it from WP. WP can read and reformat Word documents.



Marv



"Dave" <Dave@discussions.microsoft.com>wrote in message

Quote
Is there a way to have VB6 create a Word document, and then save it in

Word

Perfect format? I need to create a WP document for a client (nothing

fancy,

just text) but I don't have WP. I know Word can save as a WP doc, but is

it

possible to automate this process from VB6?







-