loading word and pdf docs in vb.net

Steven Low

Active member
Joined
Apr 14, 2005
Messages
42
Programming Experience
1-3
Hi guys

I wanna basically load word, pdf and powerpoint document onto a label or picture box. To view.

I am having problems with this. Heres what I have done soo far

VB.NET:
[COLOR=blue][FONT='Courier New']Private[/FONT][/COLOR][FONT='Courier New'] [COLOR=blue]Sub[/COLOR]  butload_Click([COLOR=blue]ByVal[/COLOR] sender [COLOR=blue]As[/COLOR] System.Object, [COLOR=blue]ByVal[/COLOR] e [COLOR=blue]As[/COLOR] System.EventArgs) [COLOR=blue]Handles[/COLOR] load.Click[/FONT]
[FONT='Courier New']        [COLOR=blue]Dim[/COLOR] OpenFile [COLOR=blue]As[/COLOR] [COLOR=blue]New[/COLOR] OpenFileDialog()[/FONT]
[FONT='Courier New'] [/FONT]
[FONT='Courier New'] [/FONT]
[FONT='Courier New']        [COLOR=green]' Configure the dialog [/COLOR][/FONT]
[FONT='Courier New']        [COLOR=blue]With[/COLOR] OpenFile[/FONT]
[FONT='Courier New']            .InitialDirectory = "G:\"[/FONT]
[FONT='Courier New']            .Filter = "Word Files (*.doc)|*.doc*"[/FONT]
[FONT='Courier New']            .CheckFileExists = [COLOR=blue]True[/COLOR][/FONT]
[FONT='Courier New']            [COLOR=green]' Open the dialog [/COLOR][/FONT]
[FONT='Courier New']            [COLOR=blue]If[/COLOR] .ShowDialog = DialogResult.OK [COLOR=blue]Then[/COLOR][/FONT]
[FONT='Courier New']                [/FONT]
[FONT='Courier New']                PictureBox1.Show()[/FONT]
[FONT='Courier New'] [/FONT]
[FONT='Courier New']            [COLOR=blue]End[/COLOR] [COLOR=blue]If[/COLOR][/FONT]
[COLOR=blue][FONT='Courier New'] [/FONT][/COLOR]
[FONT='Courier New']        [COLOR=blue]End[/COLOR] [COLOR=blue]With[/COLOR][/FONT]
[FONT='Courier New']    [COLOR=blue]End[/COLOR] [COLOR=blue]Sub[/COLOR][/FONT]
 
Loading Word in a label

Hi guys

I like to load word, pdf, and powerpoint documents in a label in vb.net to view. how would this be possible. I have been messing around with it but no luck. :confused:


Dim filNm
Dim OpenFile As New OpenFileDialog

' Configure the dialog
With OpenFile
.InitialDirectory = "G:\"
.Filter = "Word Files (*.doc)|*.doc*"
.CheckFileExists =
True
' Open the dialog
If .ShowDialog = DialogResult.OK Then



End If
End With
End Sub
 
is this still a problem for you?
i have the same problem..

though the i'd like to limit the system with just pdf's docs and xls...
docs and xls arent a problem.. i kinda have the code already..
the pdf is still a problem for me..
can you help me out..
thanks..
 
Back
Top