borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Next Topic (Access 2007 VBA) New Topic New Poll Post Reply
AndreaVB Forum : VBA (Access, Excel, Word, ...) : Help opening my word doc
Poster Message
Mark
Level: Trainee

Registered: 19-08-2008
Posts: 1

icon Help opening my word doc

Hi,

I am having some problems geting my word document to open, this is the code I have

Dim appWord As Word.Application
Dim wrdDoc As Word.Document
Dim strFileName As String
strFileName = "E:Copy of FDProjectA&Ptyneltddoc.doc"
Set appWord = New Word.Application
Set wrdDoc = appWord.Documents.Open(strFileName)
MsgBox wrdDoc.Path & "" & wrdDoc.Name
wrdDoc.Close False
appWord.Quit
Set wrdDoc = Nothing
Set appWord = Nothing
End Sub


Is there anyone that can tell me where I'm going wrong?

Thanks in advance  

19-08-2008 at 06:44 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VBA (Access, Excel, Word, ...) : Help opening my word doc
Next Topic (Access 2007 VBA) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Il portale per lui e lei | Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder