vba - how can I create a word document with excel code and avoid error notification? -
vba - how can I create a word document with excel code and avoid error notification? -
i have next excel vba code create word document template.
templatesfolder = replace(thisworkbook.fullname, thisworkbook.name, "") dim wa object, wd object set wa = createobject("word.application") filename = templatesfolder & "templates\" & "temp.docx" set wd = wa.documents.add(filename) i error filename not found until open docx file manually , press allow edit notification. after actions code work well.
this happens on new computers running first time excel file.
filename homecoming path , file exist!!!
how can prevent error?
excel vba excel-vba ms-word
Comments
Post a Comment