Save all Word macros to a txt file or Word document

gailb
3StarLounger
Posts: 254
Joined: 09 May 2020, 14:00

Save all Word macros to a txt file or Word document

Post by gailb »

I have many macros in Word that I'd like to e-mail to another computer, but unfortunately due to network restrictions, the normal .bas export will not e-mail. Is there a way to save all macros to a txt file or maybe even to a Word file?

User avatar
HansV
Administrator
Posts: 78457
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Save all Word macros to a txt file or Word document

Post by HansV »

.bas files are actually plain text files, so you could either change the extension to .txt either when you export a module, or afterwards in File Explorer.
Best wishes,
Hans

User avatar
macropod
4StarLounger
Posts: 508
Joined: 17 Dec 2010, 03:14

Re: Save all Word macros to a txt file or Word document

Post by macropod »

So why not just email the file(s) containing the macros?
Paul Edstein
[Fmr MS MVP - Word]

gailb
3StarLounger
Posts: 254
Joined: 09 May 2020, 14:00

Re: Save all Word macros to a txt file or Word document

Post by gailb »

Whatever the settings are that IT has set on the server, any files with macros are blocked from being delivered. Also, a .bas file extension is blocked as well. I changed the extension to .txt and that worked but won't be very efficient for all the modules I have with Word. Any other ideas?

User avatar
macropod
4StarLounger
Posts: 508
Joined: 17 Dec 2010, 03:14

Re: Save all Word macros to a txt file or Word document

Post by macropod »

Maybe you need to use SneekerNet (i.e physically take a copy of the files to the relevant workstation).
Paul Edstein
[Fmr MS MVP - Word]

gailb
3StarLounger
Posts: 254
Joined: 09 May 2020, 14:00

Re: Save all Word macros to a txt file or Word document

Post by gailb »

Yes, in the end this might be necessary. We are blocked from using flash drives, so might have to use a CD.

User avatar
Jay Freedman
Microsoft MVP
Posts: 1318
Joined: 24 May 2013, 15:33
Location: Warminster, PA

Re: Save all Word macros to a txt file or Word document

Post by Jay Freedman »

Try exporting all the macros to .bas files, preferably all in the same folder, and then adding all of them to a zip file. It should be possible to email or otherwise deliver the zip file to another computer, where it can be unzipped and the .bas files imported.

gailb
3StarLounger
Posts: 254
Joined: 09 May 2020, 14:00

Re: Save all Word macros to a txt file or Word document

Post by gailb »

Hi Jay and thanks, unfortunately, zip files are blocked as well.

User avatar
HansV
Administrator
Posts: 78457
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Save all Word macros to a txt file or Word document

Post by HansV »

You can use a command prompt window to rename all .bas files in the current directory to .txt:

ren *.bas *.txt

And back:

ren *.txt *.bas
Best wishes,
Hans

gailb
3StarLounger
Posts: 254
Joined: 09 May 2020, 14:00

Re: Save all Word macros to a txt file or Word document

Post by gailb »

Thanks Hans