Hi, all. I'm working in Word 2016 using VBA.
Macro worked under Win8.1 using Word 2013. It worked on the first of the files I did today. Second file, I got the blocked by organizational policy message, and it highlighted the line below. I don't think it's a problem with the macro, but want to make sure I'm not missing something!
I've set the trusted sites. I've looked under the Admin template section, and don't see word 2016 listed.
Any thoughts would be hugely appreciated. I use this file daily. It allows me to type data once, then plugs it into each place in a document where it goes, and names and saves the document for me.
Selection.NextField.Select
Selection.WholeStory
Selection.Copy
Documents.Add DocumentType:=wdNewBlankDocuments
Selection.PasteAndFormat (wdFormatOriginalFormatting)
ActiveDocument.SaveAs2 FileName:="d:\bb\20161230" & LastDat & "-" & FirstDat & " 12-30-16", FileFormat:=wdFormatDocumentDefault
Application.Documents("bb.docm").Close (Word.WdSaveOptions.wdDoNotSaveChanges)
Selection.HomeKey Unit:=wdStory
Selection.NextField.Select
Macro worked under Win8.1 using Word 2013. It worked on the first of the files I did today. Second file, I got the blocked by organizational policy message, and it highlighted the line below. I don't think it's a problem with the macro, but want to make sure I'm not missing something!
I've set the trusted sites. I've looked under the Admin template section, and don't see word 2016 listed.
Any thoughts would be hugely appreciated. I use this file daily. It allows me to type data once, then plugs it into each place in a document where it goes, and names and saves the document for me.
Selection.NextField.Select
Selection.WholeStory
Selection.Copy
Documents.Add DocumentType:=wdNewBlankDocuments
Selection.PasteAndFormat (wdFormatOriginalFormatting)
ActiveDocument.SaveAs2 FileName:="d:\bb\20161230" & LastDat & "-" & FirstDat & " 12-30-16", FileFormat:=wdFormatDocumentDefault
Application.Documents("bb.docm").Close (Word.WdSaveOptions.wdDoNotSaveChanges)
Selection.HomeKey Unit:=wdStory
Selection.NextField.Select