https://github.com/G4LB1T/Create-MacroDoc
Simple PowerShell script for automating the creation of .doc files
https://github.com/G4LB1T/Create-MacroDoc
Last synced: 5 months ago
JSON representation
Simple PowerShell script for automating the creation of .doc files
- Host: GitHub
- URL: https://github.com/G4LB1T/Create-MacroDoc
- Owner: G4LB1T
- Created: 2018-02-02T14:47:24.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-04T07:33:37.000Z (about 7 years ago)
- Last Synced: 2024-05-22T22:35:06.459Z (11 months ago)
- Language: PowerShell
- Size: 5.86 KB
- Stars: 2
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - G4LB1T/Create-MacroDoc - Simple PowerShell script for automating the creation of .doc files (PowerShell)
README
# Create-MacroDoc
Create-MacroDoc outputs a Mircosoft Office Word 1997 document.
It allows the automation of multiple similar versions of files, allowing to test how slight differences will effect it.## Parameters
### docPath
Full path for the output file.### macroContentPath
Full path of a text file containing macro to embed### linkText
Text to show in the URL embedded in the document body### linkPath
Address of the website (or local file) pointed by the link### docText
Text to be shown in the document body## Usage Example
Create a document in the path c:\out\bla.doc with a macro stored in c:\macros\m.txt, in the document's body have the text "hello" and a link to google.com with the label "GOOGLE"
```
Create-MacroDoc -docPath "c:\out\bla.doc" -macroContentPath "c:\macros\m.txt" -docText "hello" -linkText "GOOGLE" -linkPath "https://www.google.com"
```## Note
You need to have Microsoft Office installed in order to run this script.
Modern versions of Windows\Office require to set the following registry key in order to allow the Word COM object to edit VBA Object in
```
HKEY_CURRENT_USER\Software\Microsoft\Office\\Word\Security\AccessVBOM
```