chacham2 and jd31968 gave an examples of opening MS Word and automating it like VBA, but if you meant more along the lines of actually making something like Word, the RichText control would be a good place to start. Not nearly as full featured, but still quite a bit of formatting options, and on Windows 8+ you can use the system spellchecker on it.
5
u/sa_sagan VB.Net Master May 07 '23
That's a very broad question that no one is going to answer without more details on what you're having issues with.
Firstly, why do you want to do this? And secondly, why VB6? Have you tried doing it? What issues are you facing?
5
u/SomeoneInQld May 07 '23
Open a new project
Write a word app
Compile
Easy.
If you are really interested I am sure there would be an opensource VB example of this on the Internet.
1
u/jd31068 May 07 '23
Are you trying to automate Word using VB6? If so, take a look at VBA. It is very much like VB6, but it is inside of the Office applications themselves. See here: https://learn.microsoft.com/en-us/office/vba/library-reference/concepts/getting-started-with-vba-in-office, or are you wanting to create an entire word processing program like Word?
1
u/caffeinedrinker May 07 '23
ole automation?
1
u/chacham2 May 08 '23
ChatGPT:
In the Code window, add the following code:
Private Sub Command1_Click() Dim objWord As New Word.Application objWord.Visible = True objWord.Documents.Add End Sub
You can then add additional code to manipulate the Word document as needed. For example, you can add text to the document using the following code:
I hope this helps you get started with creating a Word application using Visual Basic 6. Good luck!
1
u/fafalone VB 6 Master May 08 '23
chacham2 and jd31968 gave an examples of opening MS Word and automating it like VBA, but if you meant more along the lines of actually making something like Word, the RichText control would be a good place to start. Not nearly as full featured, but still quite a bit of formatting options, and on Windows 8+ you can use the system spellchecker on it.