Why can't I set the SourceFullName property ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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"
 
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 ,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top