473,396 Members | 1,853 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,396 software developers and data experts.

How to open MS Word?

164 100+
Hi....

I want to open a ms word document from vb itself. I want to control all the functions within vb instead opening Word separately.. I dont want OLE. Rather I want to open directly.. Plz help me with full sample codes.. Its urgent...

Thanks.
Feb 2 '07 #1
7 2234
Killer42
8,435 Expert 8TB
I want to open a ms word document from vb itself. I want to control all the functions within vb instead opening Word separately.. I dont want OLE. Rather I want to open directly.. Plz help me with full sample codes.. Its urgent...
So you mean that you want complete VB code to read, interpret and format a Word document? That sounds like a might big task, in my opinion. I don't think you're going to find any easy way to avoid OLE - why do you need to?
Feb 2 '07 #2
arunbalait
164 100+
Using ole makes the process slower. And it makes to open a word doucument openly by clicking Open.. If I input a file name it should be opened for editing etc.,.. Atleast I have to do operations like editing,searching, writing etc., I used Word.Application as reference.It opens the word document separately in MS Word. But i want to open in VB itself similar to ole. Is it is possible? Is there any OCX components to do so....

LIke this i opened Pdf formats using pdf.ocx... It seems good to do...

Thanx
Feb 2 '07 #3
iburyak
1,017 Expert 512MB
Not sure if it is going to help you.

But try this.
Put on your form Ole control.

I placed following code into a click event of a button and it did load word document in this window. I remember I used it very long time ago. Sorry don't have any code to pass along to you. Just play with it and search google for different functionalities. I remember that I even was able to bring word menus here.


Expand|Select|Wrap|Line Numbers
  1. Private Sub Command1_Click()
  2.    OLE1.SourceDoc = "C:\Irina Buryak.doc"
  3.    OLE1.Action = acOLECreateLink
  4. End Sub
Feb 2 '07 #4
arunbalait
164 100+
Thanks for your code..

But I have to do without using OLE control...
Feb 2 '07 #5
Killer42
8,435 Expert 8TB
But I have to do without using OLE control...
In that case it seems as though you basically need to reverse-engineer MS Word.

In Visual Basic.

Urgently.

I just don't know what to say, except... good luck! I hope you find the answer you're seeking, but I believe it's quite unlikely.
Feb 2 '07 #6
arunbalait
164 100+
Ya. Thanx for your wishes...
Feb 2 '07 #7
iburyak
1,017 Expert 512MB
The only other way available is something like this.

http://www.microsoft.com/technet/scriptcenter/resources/officetips/sept05/tips0922.mspx

Not sure what exactly you are trying to do.
Feb 2 '07 #8

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

Similar topics

2
by: Martin Lucas-Smith | last post by:
I am trying to use PHP's COM support to open a URL from within MS Word then save the document. I am using PHP5.0.3/Apache2/WindowsXP. phpinfo() confirms that COM support is enabled. ...
3
by: TLMM | last post by:
I have a Word doc already created that I want to open from an asp page. I want it to open in Word and allow the user to modify if necessary. I currently have it opening (using href), but it is...
3
by: Andy Davis | last post by:
How do i or can I open a word document directly from Access? I would like to be able for the user to click a button on my form to open a word document and then also run a macro in Word. Thanks...
8
by: sudha | last post by:
Hi, To open a word doc from c#, i use the following code : Word.ApplicationClass WordApp = new Word.ApplicationClass (); // give any file name of your choice. object fileName =...
10
by: Åženol Akbulak | last post by:
Hi, I have a form page to print on my web application(asp.net). I want to show the page in WORD. I use that code in asp.net Page_Load event: Response.Clear(); Response.ContentType =...
4
by: Fabian | last post by:
Hello, I want to open a Word Document in my C# Programm. I tried this : Word.Application wordapp = new Word.Application(); object path = "TEST.DOC"; object vk_read_only = false; object...
0
by: Niyazi | last post by:
Hi, I created application that store the data in SQL SERVER that reside on network. The client also use this application to access the resources provided with application. But is the client want...
6
by: Bob Alston | last post by:
Looking for someone with experience building apps with multiple instances of forms open. I am building an app for a nonprofit organizations case workers. They provide services to the elderly. ...
0
by: RKovach | last post by:
I am automating Word and getting the existing instance if available using the following: Word.Application oWord = null; Word.Document oDoc = null; object oMissing =...
7
by: Peter | last post by:
ASP.NET 2.0 I am trying to open a Word document and Excel document from a dialog web page, what's the best way to do that? I have tried the following: Response.Clear();...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.