pageoffice宏插入页眉求助
我要向页眉插入一张二维码图片,我的js代码如下:
var mac = "Sub qrcode()" + "\r\n"
+ "If ActiveWindow.View.SplitSpecial <> wdPaneNone Then " + " \r\n"
+ "ActiveWindow.Panes(2).Close " + " \r\n"
+ "End If " + " \r\n"
+ "If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _ " + " \r\n"
+ "ActivePane.View.Type = wdOutlineView Then " + " \r\n"
+ "ActiveWindow.ActivePane.View.Type = wdPrintView " + " \r\n"
+ "End If " + " \r\n"
+ "ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader " + " \r\n"
+ "Selection.MoveRight Unit:=wdCharacter, Count:=10 " + " \r\n"
+ "Selection.InlineShapes.AddPicture FileName:= _ " + " \r\n"
+ "\""+imgUrl+"\", LinkToFile:=False _ " + " \r\n"
+ ", SaveWithDocument:=True " + " \r\n"
+ "Selection.MoveRight Unit:=wdCharacter, Count:=1 " + " \r\n"
+ "End Sub " + "\r\n";
document.getElementById("PageOfficeCtrl1").RunMacro("qrcode", mac);
现在的问题是word2007能插入二维码,2010及以上就不能插入二维码,VBA代码该怎么改?