Win10 Office 2016 organizational policy issue/macro

enigmaes

Board Regular
Joined
Apr 22, 2014
Messages
52
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
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,216,150
Messages
6,129,154
Members
449,488
Latest member
qh017

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top