Log in

View Full Version : Save Word Document Using Vba Excel



MH123
05-02-2017, 09:28 AM
Hi everyone

i was written a code that fill Word document and save it . But now I want to save word documents in a Patch that i have written in a cell (Excel 2013)

For example :
i used this code for save word document : doc.save as "C:\...\..." & ....&...

Sheet 1 >> Data (for words document and PDFs)

Control Sheet >>

A B C
1 Words File : C:\....\...\..
2 PDF File : D:\...\...


and the code i am using for this work is :

Dim Fpathword as String

Fpathword=Worksheets("Controlsheet").Cells(3, 3).Value

1-doc.SaveAs Filename:=Fpathword & ... & ".docx"
2-doc.SaveAs Fpathword & ... & ".docx"

But it's not Working :(:( both of them (1 ,2 )

macropod
05-02-2017, 04:39 PM
The lack of code and the vague details you've provided don't supply anywhere near enough information for anyone to know where the problem is.