mirror of
https://github.com/Set-OutlookSignatures/Set-OutlookSignatures.git
synced 2026-04-26 10:45:52 +03:00
[GH-ISSUE #109] You create a .docx template but your variables don't populate #43
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Set-OutlookSignatures-Set-OutlookSignatures#43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @adoublearonn on GitHub (Apr 23, 2024).
Original GitHub issue: https://github.com/Set-OutlookSignatures/Set-OutlookSignatures/issues/109
Originally assigned to: @adoublearonn on GitHub.
Just spent hours conquering this issue. Using verbose mode I was able to see my variables being retrieved but they were not replacing the placeholders in my signature. Finally I resolved this by trying (in Word):
Save As > Save as type > Strict Open XML Document (*.docx)
Something to try if you are having issues.
@GruberMarkus commented on GitHub (Apr 23, 2024):
Could you please share a non-working template file?
That would be very helpful because all sample templates that come with Set-OutlookSignatures are "normal" non-strict DOCX files, and I am not aware of any issues.
"Strict Open XML Document" also uses the file extension DOCX and has the same internal format, but with less features. The Microsoft documentation says:
Conforms to the Strict profile of the Open XML standard (ISO/IEC 29500). This profile of Open XML doesn't allow a set of features that are designed specifically for backward-compatibility with existing binary documents, as specified in Part 4 of ISO/IEC 29500.@adoublearonn commented on GitHub (Apr 23, 2024):
Here you go!
It's possible I did something wrong, but I wasn't able to figure out what it was if I did. Simply changing the save format makes it work.
If you change it back to Word format and save it after opening as a Strict Open XML it still works (I expected that).
@GruberMarkus commented on GitHub (Apr 24, 2024):
This Word document seems to be a bit off:
Changing the font from "SansSerif" to "Calibri" or another font makes the document work again (see screenshot 2:
).
I can not find a problem in Set-OutlookSignatures, the issue seems to be within the used Word document itself.
Edit: I can not delete any attachment posted here. This is a GitHub restriction. I can remove the link from your comment, but the file will still be there and everyone can see the change and also the original version of your comment. If you want your attachment to be deleted, you will have to contact GitHub support.
@adoublearonn commented on GitHub (Apr 24, 2024):
That is wild! I think this is a weird language thing with Word. Check out the exported unfiltered HTML from the "bad" template. There are a lot of references to de-AT. Maybe because I opened your template file and edited it with English settings.
For example, the spans with the variables in them look like this:
@GruberMarkus commented on GitHub (Apr 24, 2024):
Well, the HTML content is not of relevance here, as you use DOCX templates.
The DOCX templates are converted to HTML, but the variable replacement still takes place in Word.
So it should not be a problem to start creating your template using a new Word file, or one of the sample templates in DOCX format. I would not open an HTML file in Word and then convert it to DOCX for this purpose.
Am I missing something, or can be close this issue as successfully resolved?
@adoublearonn commented on GitHub (Apr 24, 2024):
You can go ahead and close it. I was just speculating as to why I may have encountered this issue.