Go Back   CodingForums.com > :: Server side development > ASP.NET

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-25-2009, 05:17 AM   PM User | #1
Dawoodelgharib
New to the CF scene

 
Join Date: Mar 2009
Location: UAE
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Dawoodelgharib is an unknown quantity at this point
Question How to: Open MS Word Application in vb.net?

Hi all,

I want to know the code of how to open an application from a button in a vb.net forum. The user can treat this application as if he open MS office word..
I reached this code but it doesn`t work:

Dim wa As New Microsoft.Office.Interop.Word.Application
Dim wd As New Microsoft.Office.Interop.Word.Document
wd = wa.document.open("C:\DocumentandSettings\User\Desktop\W.doc")

Thank you ..
Dawoodelgharib is offline   Reply With Quote
Old 03-25-2009, 05:31 AM   PM User | #2
Dawoodelgharib
New to the CF scene

 
Join Date: Mar 2009
Location: UAE
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Dawoodelgharib is an unknown quantity at this point
Thumbs up

Sorry,

I`ve noticed that I have the code:

This is the code try it:

Dim oWord
Dim odoc
oWord = CreateObject("Word.Application")
oWord.Visible = True
odoc = oWord.Documents.Add

It should work..thx for you all..
Dawoodelgharib is offline   Reply With Quote
Reply

Bookmarks

Tags
document, ms office, ms word, word, word application

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:54 AM.


Advertisement
Log in to turn off these ads.