Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Why can't I set the SourceFullName property ?

Nov 17, 2005 4:22PM PST

Hi,
I want to change the linked filename for Shape object, so I search VBA_Word10.CHM, and find that I can use the Shape.LinkFormat.SourceFullName. But when I use the following macro, and excute to the last on line, Word show me an error as follows..
Anyone can help me?
Thanks A Lot,
Best Regards,

----------- Error Messaage -----
RunTime Error: -2147467259
'SourceFullName'Method('LinkFormat'Object)Failed

----------- Macro Content -----
ActiveDocument.Shapes.AddPicture FileName:="C:\A.Gif", _
LinkToFile:=True, _
SaveWithDocument:=False
Dim i As Integer
i = ActiveDocument.Shapes.Count

Dim objShape As Word.Shape
Set objShape = ActiveDocument.Shapes(i)

objShape.LinkFormat.SourceFullName = "C:\B.Gif"

Discussion is locked

- Collapse -
Re: Why can't I set the SourceFullName property ?
Nov 17, 2005 5:07PM PST

Hi,
I've solve the problem, maybe because I give the relative path in my origional macro, and the new file not exist ...
thanks a lot ,

- Collapse -
It looks like like the wrong object type to me.
Nov 17, 2005 8:24PM PST
- Collapse -
Re: It looks like like the wrong object type to me
Nov 17, 2005 9:38PM PST

Thanks for you help ^^