Win10 Office 2016 organizational policy issue/macro

enigmaes

New Member
Joined
Apr 22, 2014
Messages
48
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
 

Some videos you may like

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Watch MrExcel Video

Forum statistics

Threads
1,122,670
Messages
5,597,483
Members
414,146
Latest member
marginmakerb

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
Top