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

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -