SpectacledBear
Programmer
Hi there, I have a mail merge button which has the following code on its on click event:
Dim retval As Variant
Dim DocName As String
' Drive and Full path to name and location of Word document
DocName = "E:\Word\MailMerge.doc"
'Note full path to Word including Drive and folder
retval = Shell("C:\Program Files\Microsoft Office\Office10\WinWord.exe" & " " & DocName & vbNormalFocus)
when I run it, word opens and then i see a message box saying could not find the document (E:\Word\MailMerge.doc1). Why is it putting a 1 after the doc? is this why it cant find it?
Dim retval As Variant
Dim DocName As String
' Drive and Full path to name and location of Word document
DocName = "E:\Word\MailMerge.doc"
'Note full path to Word including Drive and folder
retval = Shell("C:\Program Files\Microsoft Office\Office10\WinWord.exe" & " " & DocName & vbNormalFocus)
when I run it, word opens and then i see a message box saying could not find the document (E:\Word\MailMerge.doc1). Why is it putting a 1 after the doc? is this why it cant find it?