PDA

View Full Version : error with the AutoActive object code !!



ximpostor
10-12-2012, 12:12 PM
Why when i use this code

Private Sub Document_Open()

Dim objOLE As Word.OLEFormat
Set objOLE = ActiveDocument.InlineShapes(1).OLEFormat
objOLE.Activate

End Sub

Show me this message

http://www3.0zz0.com/2012/10/12/19/344389744.jpg

And if i choose "No" This error appears ?? :banghead:

http://www3.0zz0.com/2012/10/12/19/354387903.png

: pray2:

macropod
10-12-2012, 12:35 PM
Cross-posted at: http://www.msofficeforums.com/word-vba/14654-can-i-run-macro-when-i-open.html

For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184

fumei
10-12-2012, 01:42 PM
Please do not cross-post. You are getting help with that other thread.