Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow reading/replacing mailmerge (fixed pull 1050) #1514

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

korvinko
Copy link

@korvinko korvinko commented Nov 19, 2018

Description

Simplified version #1050

  • Cleanup unused code
  • Added setValues() method for changing preset value MERGEDFIELD
  • Allow UTF8 symbols

Example of using merge:

        $templateProcessor = new MailMergeTemplateProcessor('template.docx');
        $variables = $templateProcessor->getMailMergeVariables();
        $templateProcessor->setMergeData(['agreement_number' => 10244]);
        $templateProcessor->doMerge();
        $templateProcessor->saveAs('template2.docx');

Example of using setValues:

        $templateProcessor = new MailMergeTemplateProcessor('template.docx');
        $variables = $templateProcessor->getMailMergeVariables();
        $templateProcessor->setMergeData(['agreement_number' => 10244]);
        $templateProcessor->setValues();
        $templateProcessor->saveAs('template2.docx');

@troosan
Copy link
Contributor

troosan commented Dec 26, 2018

please fix issues and add tests

@troosan troosan added the Waiting for feedback Question has been asked, waiting for response from PR author label Dec 26, 2018
@PowerKiKi PowerKiKi changed the base branch from develop to master November 16, 2022 21:11
@Progi1984 Progi1984 force-pushed the master branch 3 times, most recently from 2d9f999 to e458249 Compare August 30, 2023 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Waiting for feedback Question has been asked, waiting for response from PR author
Development

Successfully merging this pull request may close these issues.

None yet

2 participants