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

Inserting merge fields into Word document #19

Closed
scottharvey opened this issue Jul 21, 2015 · 3 comments
Closed

Inserting merge fields into Word document #19

scottharvey opened this issue Jul 21, 2015 · 3 comments

Comments

@scottharvey
Copy link

This isn't directly related to the library but can you offer some tips on how to insert the required mail merge fields into a Word document without having a data source document?

Supporting non mail merge markup as suggested in #7 would make things easier but I understand why that is difficult to implement.

@senny
Copy link
Owner

senny commented Jul 22, 2015

This is something that should probably be documented. The process is pretty straight forward though. Go to "Insert" -> "Field" and choose "Mail Merge" from the list on the left. The list on the right doesn't matter. You can now use the text field below to enter your sablon expression.

screen shot 2015-07-17 at 15 24 41
screen shot 2015-07-17 at 15 24 31

Hope that helps, otherwise try to google for your specific Word version and your OS.

@scottharvey
Copy link
Author

Thanks taking the time to reply, I think it's just my Word skills aren't up to scratch. I'll keep searching and see if I can find out how to get it working instead of seeing this.

gif

I can copy and paste the merge fields from your example document so that's working for now. If I sort something out I'll update this issue.

@senny
Copy link
Owner

senny commented Jul 30, 2015

@scottharvey thanks for your response. Just arrived back from vacation and my answer was partially wrong. Sorry for that 😓.

In the "insert field" dialog. Choose "Mail Merge" in the list on the left and "MergeField" from the list on the right. Then write the sablon expression after "MERGEFIELD " in the input field. For example: "MERGEFIELD =user.name".

Sorry for the confusion.

@senny senny closed this as completed Jul 30, 2015
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