Hi, everybody! (and thanks in advance...)
I have a spreadsheet and I want to, by running a macro, create a new word file named after the active cell and based on a specific template.
I am trying the code bellow, withouth success.
Can someone please help me?
I also have a question, after creating the file, it opens automatically or do I have "ask" the macro to open it?
Thank you very much!
Sub Criar()
File.NewFile filename = "c\:" &ActiveCel &".docx" /t: "c:\papel carta.dot" /editor:"C:\Program Files (x86)\Microsoft Office\Office14\winword.exe"
File.Openfile Filename = "c\:" & ActiveCel & ".docx"
End Sub
I have a spreadsheet and I want to, by running a macro, create a new word file named after the active cell and based on a specific template.
I am trying the code bellow, withouth success.
Can someone please help me?
I also have a question, after creating the file, it opens automatically or do I have "ask" the macro to open it?
Thank you very much!
Sub Criar()
File.NewFile filename = "c\:" &ActiveCel &".docx" /t: "c:\papel carta.dot" /editor:"C:\Program Files (x86)\Microsoft Office\Office14\winword.exe"
File.Openfile Filename = "c\:" & ActiveCel & ".docx"
End Sub