Click here to Skip to main content
15,903,175 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questiondatagrid and vertical gridlines Pin
JerryMcguire28-Feb-06 1:28
JerryMcguire28-Feb-06 1:28 
AnswerRe: datagrid and vertical gridlines Pin
JerryMcguire28-Feb-06 1:57
JerryMcguire28-Feb-06 1:57 
QuestionSNA Server Pin
illusionFinder28-Feb-06 1:03
illusionFinder28-Feb-06 1:03 
QuestionData Binding property in vb.net Pin
pankajgarg1228-Feb-06 0:55
pankajgarg1228-Feb-06 0:55 
QuestionDatabase Problems in vb.net Pin
pankajgarg1228-Feb-06 0:40
pankajgarg1228-Feb-06 0:40 
QuestionHow to create a class inherited from StringConverter by Reflection.Emit (Dynamically) Pin
Mohamed Ali Jinnah27-Feb-06 22:58
Mohamed Ali Jinnah27-Feb-06 22:58 
Questionto invoke word,excel.... in vb.net Pin
thepityone27-Feb-06 22:32
thepityone27-Feb-06 22:32 
AnswerRe: to invoke word,excel.... in vb.net Pin
Member 22716551-Mar-06 22:23
Member 22716551-Mar-06 22:23 
In solution select ad refercnce and select com
and select Microsoft office ...9.0

ADD this before calss declaration
Imports Office = Microsoft.Office.Core


try to make a class like this
...........
or u can use with out class directly

Public Class WordAppl

Private oWordAppl As Word.ApplicationClass

Public Sub New()

oWordAppl = New Word.ApplicationClass
strOfficeNote = "OFFICE NOTE"
' GetTagsFromDB()
iRpl = 0
iTagFound = 0

End Sub

' Open a file (the file must exists) and activate it

Public Sub Open(ByVal strFileName As String)

'//////////////////////////////////////
'/ Opens specified Document file /
'//////////////////////////////////////

Dim fileName As Object = strFileName
Dim readOnly1 As Object = False
'Dim isVisible As Object = True
Dim missing As Object = System.Reflection.Missing.Value
'isVisible
'oDoc = oWordAppl.Documents.Open(fileName, missing, readOnly1, missing, missing, missing, missing, missing, missing, missing, missing, isVisible)
oDoc = oWordAppl.Documents.Open(fileName, missing, readOnly1, missing, missing, missing, missing, missing, missing, missing, missing, True)
oDoc.Activate()

End Sub


Public Sub Open()

Dim missing As Object = System.Reflection.Missing.Value
oDoc = oWordAppl.Documents.Add(missing, missing, missing, missing)
oDoc.Activate()

End Sub

Public Sub Quit()

Dim missing As Object = System.Reflection.Missing.Value
oWordAppl.Application.Quit(missing, missing, missing)

End Sub

Public Sub Save()
oDoc.Save()
End Sub

Public Sub SaveAs(ByVal strFileName As String)

Dim missing As Object = System.Reflection.Missing.Value
Dim fileName As Object = strFileName
oDoc.SaveAs(fileName, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing)

End Sub

End Class

Just try it

GOOD LUCK
QuestionRe: stoping winform instance - timer with synlock Pin
blucas200527-Feb-06 22:10
blucas200527-Feb-06 22:10 
QuestionCrystal Report Like Statment Pin
microuser_200027-Feb-06 21:33
microuser_200027-Feb-06 21:33 
AnswerRe: Crystal Report Like Statment Pin
darkelv28-Feb-06 3:41
darkelv28-Feb-06 3:41 
QuestionIssue with XML file Pin
mayhem_rules27-Feb-06 19:10
mayhem_rules27-Feb-06 19:10 
AnswerRe: Issue with XML file Pin
Christian Graus27-Feb-06 19:39
protectorChristian Graus27-Feb-06 19:39 
GeneralRe: Issue with XML file Pin
mayhem_rules27-Feb-06 20:19
mayhem_rules27-Feb-06 20:19 
GeneralRe: Issue with XML file Pin
Christian Graus28-Feb-06 11:01
protectorChristian Graus28-Feb-06 11:01 
AnswerRe: Issue with XML file Pin
Steve Pullan28-Feb-06 11:13
Steve Pullan28-Feb-06 11:13 
GeneralRe: Issue with XML file Pin
mayhem_rules28-Feb-06 18:13
mayhem_rules28-Feb-06 18:13 
GeneralRe: Issue with XML file Pin
Steve Pullan28-Feb-06 18:56
Steve Pullan28-Feb-06 18:56 
GeneralRe: Issue with XML file Pin
mayhem_rules28-Feb-06 22:02
mayhem_rules28-Feb-06 22:02 
GeneralRe: Issue with XML file Pin
Steve Pullan1-Mar-06 12:50
Steve Pullan1-Mar-06 12:50 
QuestionRemote Shutdown Pin
chrysler_vergara_m27-Feb-06 18:51
chrysler_vergara_m27-Feb-06 18:51 
AnswerRe: Remote Shutdown Pin
illusionFinder28-Feb-06 1:53
illusionFinder28-Feb-06 1:53 
QuestionWeb Connection Blocked Pin
huckeuri27-Feb-06 18:45
huckeuri27-Feb-06 18:45 
QuestionHow to generate crystal reports by passing parameter indirectly? Pin
jkrao27-Feb-06 18:15
jkrao27-Feb-06 18:15 
Questionconversion help...... Pin
ss65432127-Feb-06 16:05
ss65432127-Feb-06 16:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.