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

Extract Code Snippets from MD Files #309

Merged
merged 8 commits into from
Feb 6, 2024

Conversation

Copy link
Contributor

Learn Build status updates of commit 35006ba:

✅ Validation status: passed

File Status Preview URL Details
docs/includes/iso-iec-29500-2-link.md ✅Succeeded
docs/word/how-to-remove-hidden-text-from-a-word-processing-document.md ✅Succeeded
docs/word/how-to-remove-the-headers-and-footers-from-a-word-processing-document.md ✅Succeeded
docs/word/how-to-replace-the-header-in-a-word-processing-document.md ✅Succeeded
docs/word/how-to-replace-the-styles-parts-in-a-word-processing-document.md ✅Succeeded
docs/word/how-to-retrieve-application-property-values-from-a-word-processing-document.md ✅Succeeded
docs/word/how-to-retrieve-comments-from-a-word-processing-document.md ✅Succeeded
docs/word/how-to-set-a-custom-property-in-a-word-processing-document.md ✅Succeeded
samples/word/remove_hidden_text/cs/Program.cs ✅Succeeded
samples/word/remove_hidden_text/vb/Program.vb ✅Succeeded
samples/word/remove_the_headers_and_footers/cs/Program.cs ✅Succeeded
samples/word/remove_the_headers_and_footers/vb/Program.vb ✅Succeeded
samples/word/replace_the_header/cs/Program.cs ✅Succeeded
samples/word/replace_the_header/vb/Program.vb ✅Succeeded
samples/word/replace_the_styles_parts/cs/Program.cs ✅Succeeded
samples/word/replace_the_styles_parts/vb/Program.vb ✅Succeeded
samples/word/retrieve_application_property_values/cs/Program.cs ✅Succeeded
samples/word/retrieve_application_property_values/vb/Program.vb ✅Succeeded
samples/word/retrieve_comments/cs/Program.cs ✅Succeeded
samples/word/retrieve_comments/vb/Program.vb ✅Succeeded
samples/word/set_a_custom_property/cs/Program.cs ✅Succeeded
samples/word/set_a_custom_property/vb/Program.vb ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link
Collaborator

@twsouthwick twsouthwick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one comment, otherwise LGTM

// Open the document for write access and get a reference.
using (var document = WordprocessingDocument.Open(fileName, true))
{
if (document.MainDocumentPart is null || document.MainDocumentPart.StyleDefinitionsPart is null || document.MainDocumentPart.StylesWithEffectsPart is null)
if (document.MainDocumentPart is null || document.MainDocumentPart.StyleDefinitionsPart is null && document.MainDocumentPart.StylesWithEffectsPart is null)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this reads weird. I think you need parentheses

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I corrected it.

Copy link
Contributor

Learn Build status updates of commit 4962826:

✅ Validation status: passed

File Status Preview URL Details
docs/includes/iso-iec-29500-2-link.md ✅Succeeded
docs/word/how-to-remove-hidden-text-from-a-word-processing-document.md ✅Succeeded
docs/word/how-to-remove-the-headers-and-footers-from-a-word-processing-document.md ✅Succeeded
docs/word/how-to-replace-the-header-in-a-word-processing-document.md ✅Succeeded
docs/word/how-to-replace-the-styles-parts-in-a-word-processing-document.md ✅Succeeded
docs/word/how-to-retrieve-application-property-values-from-a-word-processing-document.md ✅Succeeded
docs/word/how-to-retrieve-comments-from-a-word-processing-document.md ✅Succeeded
docs/word/how-to-set-a-custom-property-in-a-word-processing-document.md ✅Succeeded
samples/word/remove_hidden_text/cs/Program.cs ✅Succeeded
samples/word/remove_hidden_text/vb/Program.vb ✅Succeeded
samples/word/remove_the_headers_and_footers/cs/Program.cs ✅Succeeded
samples/word/remove_the_headers_and_footers/vb/Program.vb ✅Succeeded
samples/word/replace_the_header/cs/Program.cs ✅Succeeded
samples/word/replace_the_header/vb/Program.vb ✅Succeeded
samples/word/replace_the_styles_parts/cs/Program.cs ✅Succeeded
samples/word/replace_the_styles_parts/vb/Program.vb ✅Succeeded
samples/word/retrieve_application_property_values/cs/Program.cs ✅Succeeded
samples/word/retrieve_application_property_values/vb/Program.vb ✅Succeeded
samples/word/retrieve_comments/cs/Program.cs ✅Succeeded
samples/word/retrieve_comments/vb/Program.vb ✅Succeeded
samples/word/set_a_custom_property/cs/Program.cs ✅Succeeded
samples/word/set_a_custom_property/vb/Program.vb ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

@twsouthwick twsouthwick merged commit 45cd994 into OfficeDev:main Feb 6, 2024
3 checks passed
@mikeebowen mikeebowen deleted the extract-snippets branch February 6, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment