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

Insert new mail merge fields using sablon #175

Open
coezbek opened this issue Sep 30, 2021 · 2 comments
Open

Insert new mail merge fields using sablon #175

coezbek opened this issue Sep 30, 2021 · 2 comments

Comments

@coezbek
Copy link

coezbek commented Sep 30, 2021

Is there a way to let Sablon insert mail merge fields into the word template?

This would be helpful to build the template in the first place.

I imagine the following workflow:

  • Build context object in Ruby
  • Create the template with a merge field called something like allFields
  • Run Sablon once to have it generate new merge fields for the whole context and insert them in the position of allFields.
@stadelmanma
Copy link
Collaborator

Hey @coezbek the word templates are finicky at times since docx files aren’t really designed in a friendly way to interact with outside of MS word itself.

That being said I’m not quite sure I understand. Are you meaning to insert the all the fields in the doc so that one could copy and paste them around?

@coezbek
Copy link
Author

coezbek commented Sep 30, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants