自动格式化单词文档PHP,单词宏

I have an idea that I am unsure of it being plausible. I have a script that creates a word document that is not formatted at all, what i want to do is have it automatically formatted or a one click solution so that the user doesn't have to waste time formatting it.

My approach is I want a macro to follow the created document so that whoever downloads the document also gets the macro and they can just click the macro to format the document.

here is my word macro

Sub FormatText()
'
' FormatText Macro
'
'
Selection.WholeStory
Selection.Font.Name = "Trebuchet MS"
Selection.Font.Size = 10
With Selection.ParagraphFormat
    .LeftIndent = CentimetersToPoints(0)
    .RightIndent = CentimetersToPoints(0)
    .SpaceBefore = 0
    .SpaceBeforeAuto = False
    .SpaceAfter = 5
    .SpaceAfterAuto = True
    .LineSpacingRule = wdLineSpaceSingle
    .Alignment = wdAlignParagraphLeft
    .WidowControl = True
    .KeepWithNext = False
    .KeepTogether = False
    .PageBreakBefore = False
    .NoLineNumber = False
    .Hyphenation = True
    .FirstLineIndent = CentimetersToPoints(0)
    .OutlineLevel = wdOutlineLevelBodyText
    .CharacterUnitLeftIndent = 0
    .CharacterUnitRightIndent = 0
    .CharacterUnitFirstLineIndent = 0
    .LineUnitBefore = 0
    .LineUnitAfter = 0
    .MirrorIndents = False
    .TextboxTightWrap = wdTightNone
End With
Selection.Font.Color = 4214888
End Sub

and here is the php script that creates the document.

<?php 
function createDoc() {
$information = "";
foreach ($_POST['docText'] as  $value) {
    $information .= $value; 
}

$file = "ProposalCredentials.doc";
file_put_contents($file, $information, LOCK_EX);
}

function download() {

$file = 'ProposalCredentials.doc';
header('Content-type: application/msword');
header('Content-length: ' .filesize($file));
header('Content-Disposition: attachment; filename='.$file);
readfile($file);
}

createDoc();
download();

?>

Can this type of thing be done?
Is this the right path to be heading?
Or should I be focusing on the headers and formatting there?
Or should I focus on the variable $information and format it there?
Or do I have to get each user to create the macro on there computer?(trying to avoid this)

A push in the right direction would be greatly appreciated.