L
Leonid N
We have a problem in Word 2007 with our application using Word.Basic COM. I
created a small VBscript demonstrating the problem:
Set WordObj = CreateObject("Word.Basic")
WordObj.FileNewDefault()
WordObj.AppShow()
WordObj.insert("Some text")
WordObj.InsertPicture "some picture file",0,0
WordObj.CharLeft 1,1
WordObj.FormatPicture 0, 0, 0, 0, 0, 50, 50, 0, 0
Set WordObj = Nothing
The script works fine with Word 2003 but generates error:
test.vbs(7, 1) Microsoft Word: The FormatPicture command is not available
because the current selection is not a graphic.
with Word 2007.
Any idea why this happens and how to bypass the problem?
Rgds, Leonid
created a small VBscript demonstrating the problem:
Set WordObj = CreateObject("Word.Basic")
WordObj.FileNewDefault()
WordObj.AppShow()
WordObj.insert("Some text")
WordObj.InsertPicture "some picture file",0,0
WordObj.CharLeft 1,1
WordObj.FormatPicture 0, 0, 0, 0, 0, 50, 50, 0, 0
Set WordObj = Nothing
The script works fine with Word 2003 but generates error:
test.vbs(7, 1) Microsoft Word: The FormatPicture command is not available
because the current selection is not a graphic.
with Word 2007.
Any idea why this happens and how to bypass the problem?
Rgds, Leonid