Closed kilasuit closed 7 years ago
This is what I do:
$doc = Document {
Paragraph 'This is just an example'
}
$doc | Export-CliXml -Path .\DocumentBackup.xml -Depth 100
Once you've reimported, you can manipulate the document model as you need. Do you have a specific example?
It's more for when working with an existing document that wasn't created using PScribo so there would be a need for an Import-Document and subsequent additional functions too.
Ahh! Yeah I doubt that's ever going to get implemented 😢. There are simply too many variables across each document type. Updating an existing PScribo document (it's just a PSCustomObject
) should be possible, e.g. adding a new section or removing an existing section/paragraph etc.
It would be a pretty cool feature to be able to import an existing document into a PScribo document Object and make use of PScribo to then update the document (or a small section of it)
I certainly have a usecase for this at my current client to update existing documentation as the production environment grows.