Beginner VB

Moderators: None (Apply to moderate this forum)
Number of threads: 1233
Number of posts: 2978

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
I need help from you guyz...please,help me..... Posted by gioanne on 11 Sept 2008 at 11:34 PM
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...
Report
Re: I need help from you guyz...please,help me..... Posted by rushentt on 15 Sept 2008 at 1:46 PM
: 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...
:

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.
Report
Re: I need help from you guyz...please,help me..... Posted by gioanne on 18 Sept 2008 at 12:17 AM
thank you very much but i don't have Microsoft Word 8.0 Object Library" (or "Microsoft Word 9.0 Object Library" if you are using Word 2000). I only have Microsoft Word 11.0 Project Library...




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.