473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Why don't u answer my question if u know how to connect to M.S word with V.b 6.0

Hi all! Pls answer my question, this is third time i am asking.....
I would like to write some data to m.s word document, and read data from ms word.

till now i used "files" in v.b 6.0, using "input","output" "open" "close" lke methods.... but i want to connect to M.S word document through v.b application, and i should be able to change fonts.. size etc... Pls provide me a sample example. it may be helpful to me..
Thanks in advance:
regards:
raghunadhs
Jul 23 '07 #1
2 1156
hanhan
2
hi,
I can help you a little -
first, you should add this reference:
"Microsoft Word 10.0 Object Library"
After that, you can start working with Word objects.

---
This example inserts 10 lines of text into a new document.

Expand|Select|Wrap|Line Numbers
  1. Documents.Add
  2.  
  3. Selection.Font.Color = wdColorBlue
  4. Selection.Font.Bold = True
  5. Selection.Text = "Hello! Try this word document..." & Chr(13)
  6. Selection.MoveDown Unit:=wdParagraph, Count:=1
  7.  
  8. Selection.Font.Color = wdColorBlack
  9. Selection.Font.Bold = false
  10.  
  11. For i = 1 To 10
  12.     Selection.Text = "Line" & Str(i) & Chr(13)
  13.     Selection.MoveDown Unit:=wdParagraph, Count:=1
  14. Next i
You can also declare objects and try to work with them - for ex. :

Dim wApp As New Word.Application
Dim wDoc As New Word.Document

You can also save, open file, etc.... sorry - just search in the Help by typing F1 on each interesting command.

Good luck

Hi all! Pls answer my question, this is third time i am asking.....
I would like to write some data to m.s word document, and read data from ms word.

till now i used "files" in v.b 6.0, using "input","output" "open" "close" lke methods.... but i want to connect to M.S word document through v.b application, and i should be able to change fonts.. size etc... Pls provide me a sample example. it may be helpful to me..
Thanks in advance:
regards:
raghunadhs
Jul 23 '07 #2
Hi hanhan]hi!
Thanks for u r response, i will go through your example and make u know feed back if any...
Thanks:
regards:
raghunadhs.v

hi,
I can help you a little -
first, you should add this reference:
"Microsoft Word 10.0 Object Library"
After that, you can start working with Word objects.


Good luck
Jul 24 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Dave H | last post by:
Hello, I have a query regarding definition lists. Is it good practice semantically to use the dt and dd elements to mark up questions and answers in a frequently asked questions list, or FAQ? ...
5
by: Mario Reiley | last post by:
Hi, Group The application run OK in my local machine but don't run in other machine. I am Install The Framework and the Framework Redistributable Package in all the PCs. I get the following...
6
by: AbeR | last post by:
I'm an intermediate/novice (I've probably developed a half dozen ASP.NET apps at this point) ASP.NET C# developer at this point and am totally strumped by a client's setup. I am developing this...
19
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set...
2
by: Sophia | last post by:
Hello, I hope somebody can help me with this, I am getting crazy! When I click on the security tab on the WSAT page (Website/ASP.NET configuration) I get the following message: "There is a...
2
by: mike_li | last post by:
4) If the following commands are executed: UPDATE DBM CFG USING DFT_MON_LOCK OFF UPDATE MONITOR SWITCHES USING lock ON And the DB2 instance is stopped and restarted, the monitor switch for the...
3
by: Hugh Welford | last post by:
Hi Bob - had the advice below from you recently:- hugh welford wrote: > Hi - using XP pro with IIS to develop offline asp data access site. > > Suddenly, my DSNs and odbc drivers have...
47
by: Lauren Wilson | last post by:
One more try. After ransacking the Desktop AND Enterprise edition of Ken Getz Dev Handbooks on Access 2002, I STILL don't know if it is or is not possible to link a client side MDE with a WEB...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.