Word 2007 dotm and docm

M

Madison

Hi there,

Since our office upgrade to office 2007, we try to convert templates and
other document to new format. We are using third party software to manage our
documents. We have small VB exe to help speed up process by pick the template
and rename then place to the document system then check it out and run some
macro in the document. Now with word 2007, we need to create the document
from dotm and save to docm. We cannot the vb exe anymore because the the docm
file has no macro attach to it. I have spent time almost the whole week
fighting the this. Below is my coding
Dim oWord As Word.Application
Dim oDoc As Word.Document

Dim strTemplate As String
strTemplate = App.Path & "\" & "D - Voluntary Decert.dotm"

'Set oWord = CreateObject("Word.Application")
Set oWord = New Word.Application

Set oDoc = oWord.Documents.Add(Template:=strTemplate)
oWord.Visible = False

oDoc.SaveAs App.Path & "\myVoluntary.docm"

oDoc.Close
oWord.Quit

Set oDoc = Nothing
Set oWord = Nothing

When I try to open myVoluntary.docm, I got the message “The office open xml
file myVoluntary.docm cannot be open because there are problems with the
content.†When click at view detail the very helpful message say “No error
detail availableâ€

Please any advice on website or any books on how to handle this process.
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top