Hi Patel45,
Thank you so much for your reply, it was exactly what I needed. Can you help me with my next problem? Now I need to open the newly created word document. As before, I need to allow the user to manually input the location of the Word document. Here is my current code, it works great but the Path is hard coded into the code.
Sub Open_Word_Document()
Const strPath As String = "C:\Users\inina\Desktop\CaseFolder\" 'The last characters has to be a "\"
Dim strFileName As String
Dim extension As String
myMsg1 = "Do you want to open a Word Document?"
myTitle = "Open Word Document"
Select Case MsgBox(myMsg1, vbQuestion + vbYesNo, myTitle)
Case vbYes
strFileName = InputBox("Please enter file name", "Open Word Document")
If strFileName = vbNullString Then Exit Sub
extension = ".docx" '".doc"
Dim Word As Object: Set Word = CreateObject("Word.Application")
Word.Visible = True
Set docWD = Word.Documents.Open(strPath & strFileName & extension)
docWD.SaveAs ThisWorkbook.Path & "\" & strFileName, FileFormat:=wdFormatDocument
'ThisWorkbook.Sheets("REPORT").Range("C7:J56").Copy
'Word.Selection.Paste
Case vbNo
End Select
End Sub
Bookmarks