im a graduating computer science student and one of our requirements is to make thesis...our topic is text auto-copying to microsoft word...can anyone help me make it???i will be using VB6 and im new with VB6...so,as you see it is very difficult....please help me....thanks...
Comments
: is to make thesis...our topic is text auto-copying to microsoft
: word...can anyone help me make it???i will be using VB6 and im new
: with VB6...so,as you see it is very difficult....please help
: me....thanks...
:
Here is an example from Microsoft's MSDN site:-
1. Start a new Standard EXE project in Visual Basic. Form1 is created by default.
2. On the Project menu, click References, and select "Microsoft Word 8.0 Object Library" (or "Microsoft Word 9.0 Object Library" if you are using Word 2000).
3. Add a CommandButton to Form1.
4. Add the following code to the Click event of the CommandButton:
5.
6. Dim oWordApp As Word.Application
7.
8. 'Start a new instance of Microsoft Word
9. Set oWordApp = New Word.Application
10.
11. With oWordApp
12.
13. 'Create a new document
14. .Documents.Add
15.
16. 'Add text to the document
17. .Selection.TypeText Text:="one"
18. .Selection.TypeParagraph
19. .Selection.TypeText Text:="two"
20. .Selection.TypeParagraph
21. .Selection.TypeText Text:="three"
22. 'Save the document
23. .ActiveDocument.SaveAs FileName:="c:Doc1.doc", _
24. FileFormat:=wdFormatDocument, LockComments:=False, _
25. Password:="", AddToRecentFiles:=True, WritePassword _
26. :="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
27. SaveNativePictureFormat:=False, SaveFormsData:=False, _
28. SaveAsAOCELetter:= False
29.
30. End With
31.
32. 'Quit Word
33. oWordApp.Quit
34.
35. 'Unload this form
36. Unload Me
37. Press F5 to run the program and click the CommandButton. When the program ends, examine the Word document ("C:doc1.doc") it created.