Hello Dear community,
I have a VBA workbook which copy data from Word document and saves it to new excel file.
Can anybody help me to save it to existing workbook instead of new workbook?
Thank you.
I have a VBA workbook which copy data from Word document and saves it to new excel file.
Can anybody help me to save it to existing workbook instead of new workbook?
VBA Code:
For Each f In fo.Files
Set doc = wa.documents.Open(f.Path, False, Format:="PDF Files")
Set wr = doc.Paragraphs(1).Range
wr.WholeStory
Set nwb = Workbooks.Add
Set nsh = nwb.Sheets(1)
wr.Copy
nsh.Paste
nwb.SaveAs (excel_path & "\" & Replace(f.Name, ".pdf", ".xlsx"))
doc.Close False
nwb.Close False
Next