I am wanting to open some documents that exist on disk so that they can be printed when required. The problem is that i have to hard code the file locations, the problem with this is when the database is finished the files will no longer exist in the directory path coded, is there a way to specify which file to open without specifying the full path?
below is my code
Dim loc As String, str As String
loc = "C:\Paul\Third Year\ie\database\ucc\blankforms\"
Dim myObject As Word.Application
Set myObject = CreateObject("Word.Application")
str = loc & "RegistrationForm.doc"
myObject.Documents.Open str, , True
below is my code
Dim loc As String, str As String
loc = "C:\Paul\Third Year\ie\database\ucc\blankforms\"
Dim myObject As Word.Application
Set myObject = CreateObject("Word.Application")
str = loc & "RegistrationForm.doc"
myObject.Documents.Open str, , True