开发者

Strange problem in MS Word VBA. Insert symbol results in empty square

I experience a strange problem in MS Word 2010 VBA. I added a ribbon command calling the following code Selection.InsertSymbol Font:="Wingdings 3", CharacterNumber:=-4028, Unicode:=True After opening Word application for couple of minutes the call to this line results in empty squares as if the font was not found. After that all works normally and the symbols are written correctly. Is there any workaround? I found similar question here [on SO][1]

[1]: Inserting symbols into text in PowerPoint 2007 using VBA but I am not sure that I can use the solution provided there in MS Word. Mayb开发者_StackOverflowe there is a way to just preload the Windlings font?


CharacterNumber is a Variant type, so it should take string values for most things. Just enclose the number in double-quotes. This one works for me:

Selection.InsertSymbol Font:="Wingdings 3", CharacterNumber:="-4028", Unicode:=True
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜