Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Tue, 19 Aug 2008 02:33:01 -0700,    group: microsoft.public.word.vba.general        back       


LinkFormat.AutoUpdate error   
Hi all,

I'm trying to generate a script that
1) pastes a Excel selection as a linked Metafile Picture and
2) adjusts the properties of the pasted picture, amongst which the 
AutoUpdate property (which needs to be set to False)

-------------------

    Selection.Collapse Direction:=wdCollapseStart
    Selection.PasteSpecial Link:=True, DataType:=wdPasteMetafilePicture, _
        Placement:=wdInLine, DisplayAsIcon:=False
    
    Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    If Selection.Type = wdSelectionInlineShape Then
        With Selection.InlineShapes(0)
            .LinkFormat.AutoUpdate = False
            .LockAspectRatio = msoTrue
            wShape = .Width
            hShape = .Height
            
            wShapeN = CentimetersToPoints(16)
            .Width = wShapeN
            .Height = wShapeN / wShape * hShape
        End With
    End If

-------------------

I had a working script running, but now all of a sudden I get a "run-time 
error 4198" on the
                   .LinkFormat.AutoUpdate = False
line in the code.

I have absolutely no idea why it won't execute, since the InlineShapes 
object is properly returned and recognized (if I bring the .LockAspectRatio 
property to the front, that one does execute).

Maybe someone here has a clue to what is the problem, and maybe a workaround 
for this?
date: Tue, 19 Aug 2008 02:33:01 -0700   author:   DFKT dfactive [bij] gmail [punt] com

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us