Removing CustomUI when saving word file from template
I have a template I am creating with a CustomUI ribbon. I have done this in the past, but now the documents created from the template I am working on still have the ribbon elements in the saved document when it is reopened (they don't show up when the document is first created).
The template is a macro enabled template (.dotm), and it is stored in a trusted location (startup folder). I have other templates in the same location that work properly.
I'm at my wit's end with this, my company wants to start using this early next week, and I have spent over a day trying to figure out why this isn't working like the other templates.There are differences, but the basics are the same as the other templates I have used.
This is the code to create the Document:
Application.Documents.Add(Template:=ThisDocument.F ullName, visible:=True)
This is the code used to save the document:
Call Application.ActiveDocument.SaveAs(FileName:=saveFi lePath, FileFormat:=wdFormatXMLDocument)
This is exactly the same code I used for the other documents i have createin the past.
I need this to work on both a Mac and a PC. I have found code that strips the customUI folder from the zip file on a PC, but that was giving me problems as well as it won't be cross-platform.
Can anyone help me, any hint on what I might be missing here?
Edit: For some reason, the forum is adding spaces into the code. The code is correct in the file
|