Reputation: 11
I have the following c# .Net code in WPF app code:
public static void ClearList(IHTMLDocument document)
{
if (CanSetBlockFormat(document))
{
OleCommandTargetHelper.Execute(document, MsHtmcid.IDM_BLOCKFMT, new object[] { "Normal" });
}
}
where:
internal static object Execute(IHTMLDocument document, MsHtmcid command, object[] arguments)
{
var commandTarget = (DocObj.IOleCommandTarget)document;
var retVal = new object[] { null };
var hr = commandTarget.Exec(
ref NativeMethods.Guid_MSHTML,
(int)command,
(int)DocObj.OLECMDEXECOPT.DONTPROMPTUSER,
arguments,
retVal);
return retVal[0];
}
This is used for editing and formatting html text in WebView/WPF, where the web browser used is internet explorer and is used as a kind of rich text editor generating required HTML.
In this particular case it is used to remove formatting from bulleted or numbered list.
Can anyone tell me why this code doesn't work the moment I change windows langauge settings to non-english (Austrian for example?)
Upvotes: 1
Views: 48