Help with a basic Word 365 macro

%3CLINGO-SUB%20id%3D%22lingo-sub-2364526%22%20slang%3D%22en-US%22%3EHelp%20with%20a%20basic%20Word%20365%20macro%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2364526%22%20slang%3D%22en-US%22%3E%3CP%3EI%20wonder%20if%20anyone%20can%20help.%26nbsp%3B%20I%20am%20migrating%2045%20PC%20from%20Office%202013%20to%20365.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%203%20basic%20macros%20that%20copy%20and%20paste%20some%20simple%20word%20documents.%26nbsp%3B%20These%20were%20working%20fine%20in%20Word%202013.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThey%20all%20stop%20at%20the%20paste%20section.%26nbsp%3B%20An%20example%20of%20a%20code%20is%20below.%26nbsp%3B%20Anyone%20able%20to%20point%20me%20in%20the%20right%20direction%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EG%20drive%20is%20our%20file%20print%20server%3C%2FP%3E%3CP%3E---------------------------------------------------------------------------------------------------------------%3C%2FP%3E%3CP%3ESub%20NEWSMLLETTER1()%3CBR%20%2F%3E'%3CBR%20%2F%3E'%20NEWSMLLETTER1%20Macro%3CBR%20%2F%3E'%3CBR%20%2F%3E'%3CBR%20%2F%3EChangeFileOpenDirectory%20_%3CBR%20%2F%3E%22G%3A%5CWord%20Office%20Templates%202013%5CNew%20SML%20Letterheads%20for%20Macros%5C%22%3CBR%20%2F%3EDocuments.Open%20FileName%3A%3D%20_%3CBR%20%2F%3E%22G%3A%5CWord%20Office%20Templates%202013%5CNew%20SML%20Letterheads%20for%20Macros%5CNEW%20MASTER%201%20Without%20Heading.docx%22%20_%3CBR%20%2F%3E%2C%20ConfirmConversions%3A%3DFalse%2C%20ReadOnly%3A%3DFalse%2C%20AddToRecentFiles%3A%3DFalse%2C%20_%3CBR%20%2F%3EPasswordDocument%3A%3D%22%22%2C%20PasswordTemplate%3A%3D%22%22%2C%20Revert%3A%3DFalse%2C%20_%3CBR%20%2F%3EWritePasswordDocument%3A%3D%22%22%2C%20WritePasswordTemplate%3A%3D%22%22%2C%20Format%3A%3D%20_%3CBR%20%2F%3EwdOpenFormatAuto%2C%20XMLTransform%3A%3D%22%22%3CBR%20%2F%3ESelection.WholeStory%3CBR%20%2F%3ESelection.Copy%3CBR%20%2F%3EActiveDocument.Close%3CBR%20%2F%3EDocuments.Add%20Template%3A%3D%22Normal%22%2C%20NewTemplate%3A%3DFalse%2C%20DocumentType%3A%3D0%3CBR%20%2F%3E%3CFONT%20color%3D%22%23FFFF00%22%3ESelection.PasteAndFormat%20(wdUseDestinationStylesRecovery)%3C%2FFONT%3E%3CBR%20%2F%3EEnd%20Sub%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2364526%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

I wonder if anyone can help.  I am migrating 45 PC from Office 2013 to 365.

 

I have 3 basic macros that copy and paste some simple word documents.  These were working fine in Word 2013.

 

They all stop at the paste section.  An example of a code is below.  Anyone able to point me in the right direction?

 

G drive is our file print server

---------------------------------------------------------------------------------------------------------------

Sub NEWSMLLETTER1()
'
' NEWSMLLETTER1 Macro
'
'
ChangeFileOpenDirectory _
"G:\Word Office Templates 2013\New SML Letterheads for Macros\"
Documents.Open FileName:= _
"G:\Word Office Templates 2013\New SML Letterheads for Macros\NEW MASTER 1 Without Heading.docx" _
, ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, _
PasswordDocument:="", PasswordTemplate:="", Revert:=False, _
WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _
wdOpenFormatAuto, XMLTransform:=""
Selection.WholeStory
Selection.Copy
ActiveDocument.Close
Documents.Add Template:="Normal", NewTemplate:=False, DocumentType:=0
Selection.PasteAndFormat (wdUseDestinationStylesRecovery)
End Sub

0 Replies