Hello everyone,
I have been working with MSWordUtils to manipulate and automate some tasks in my Word documents, and it has been quite helpful. However, I’ve encountered a challenge that I hope some of you might be able to help me with.
I want to insert a bullet list at a specific location in my document, but I'm not quite sure how to go about it. I have some text already present in the document, and I want the bullet list to replace a particular word or phrase.
Here’s a simplified version of what I’m trying to achieve:
Does anyone know if this is possible with MSWordUtils? Any examples or documentation references would be greatly appreciated!
Thank you in advance for your help!
Thanks DerAstrit,
Apologies I missed the key phrase in your post that of "a specific place".
You are correct there is no action to do that currently.
With the underlying library, the only stable way I have found to place items at a specific location is to place a bookmark in the document at the location and to replace the bookmark with the content. Would this work for you? If so, I will make a modification to the library to add a "ReplaceBookmarkWithBulletList" action.
Kind regards,
Stuart
Hello DerAstrit,
Try the documentation page for the component. Search for "bullet"
https://www.outsystems.com/forge/component-documentation/4422/mswordutils/0
Hi @Stuart HarrisI searched in the Documentation but could not find how to place it in a specific place. Do you know if another forge does that or if I am missing something?
Regards,
Astrit
Hi Stuart,
Thank you for getting back to me. The idea of placing a bookmark at a specific location in the document and then replacing it with content sounds workable. I believe that the "ReplaceBookmarkWithBulletList" action would be a valuable addition to the library, and it would definitely assist me.
I look forward to seeing and trying out the updated library. Thanks again for your support!
Best regards,Astrit
Thanks DerAstrit, I'll get onto it!
Hi DerAstrit,
I have been trying to insert a bullet point list at a specific point, but the underlying library does not have a direct way of doing it.
I am trying to mess with the underlying XML, but it is not looking promising at the moment.
I will keep trying for the moment.
Hope you’re doing well! Just a quick heads-up - I’ve rigged up a temporary fix for now. I used the MSWORD_ReplaceText and mashed it up with the list to get something workable. Here’s a peek at what I did:ServiceTransitionAndSetupTextList + "
• " + setuplist.Current.Text
It’s not exactly what we wanted, but it’s getting the job done for now. But yeah, having a dedicated feature for this in the future would definitely be awesome and make things a lot smoother.Regards,Astrit