J
John
Hi,
I'm trying to create a procedure that will import an image file as a master
and then place it on a number of background pages. The placing bit I'm
happy with, but I'm having trouble with refering to the master once it's in
the document stencil. I'm trying to name it "Logo" so I can then refer to
it more easily than a number ("Master.12" for instance).
It's the last two lines that appear to be the problem. Can anyone tell me
where I'm going wrong??
Thanks in advance
Regards
John
Sub ImportImage()
Dim docObj As Visio.Document
Dim newLogoMstr As Visio.Master
Dim logoFile As String
Dim logoShp As Visio.Shape
Dim mastersObj As Visio.Masters
Dim logoName As String
logoName = "Logo"
logoFile = "C:\Image.wmf"
Set docObj = ActiveDocument
Set mastersObj = docObj.Masters
newLogoMstr = mastersObj.Add.Import(logoFile)
newLogoMstr.Name = logoName
I'm trying to create a procedure that will import an image file as a master
and then place it on a number of background pages. The placing bit I'm
happy with, but I'm having trouble with refering to the master once it's in
the document stencil. I'm trying to name it "Logo" so I can then refer to
it more easily than a number ("Master.12" for instance).
It's the last two lines that appear to be the problem. Can anyone tell me
where I'm going wrong??
Thanks in advance
Regards
John
Sub ImportImage()
Dim docObj As Visio.Document
Dim newLogoMstr As Visio.Master
Dim logoFile As String
Dim logoShp As Visio.Shape
Dim mastersObj As Visio.Masters
Dim logoName As String
logoName = "Logo"
logoFile = "C:\Image.wmf"
Set docObj = ActiveDocument
Set mastersObj = docObj.Masters
newLogoMstr = mastersObj.Add.Import(logoFile)
newLogoMstr.Name = logoName