Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
67 lines (50 sloc) 1.73 KB
sub ChangeId_AddFixed
' ** Change the id of all selected/active objects by adding _fixed at the end
' used for https://github.com/countnazgul/Qlikview-Fixed-Content
set sheet = ActiveDocument.ActiveSheet
objects = sheet.GetSheetObjects
for i = lbound(objects) to ubound(objects)
if objects(i).IsActive then
id = objects(i).GetObjectId
objType = objects(i).GetObjectType
if InStr(id, "_fixed") = 0 then
prop = objects(i).GetProperties
if objType = 5 or objType = 31 or objType = 36 then ' search object, container and button
prop.Frame.ObjectId = id & "_fixed"
else
if objType = 12 then ' chart object
prop.GraphLayout.Frame.ObjectID = id & "_fixed"
else
prop.Layout.Frame.ObjectID = id & "_fixed"
end if
end if
objects(i).SetProperties prop
end if
end if
next
end sub
sub ChangeId_RemoveFixed
' ** Change the id of all selected/active objects by removing _fixed
' used for https://github.com/countnazgul/Qlikview-Fixed-Content
set sheet = ActiveDocument.ActiveSheet
objects = sheet.GetSheetObjects
for i = lbound(objects) to ubound(objects)
if objects(i).IsActive then
id = objects(i).GetObjectId
objType = objects(i).GetObjectType
if InStr(id, "_fixed") > 0 then
prop = objects(i).GetProperties
if objType = 5 or objType = 31 or objType = 36 then ' search object, container and button
prop.Frame.ObjectId = Replace(id, "_fixed", "")
else
if objType = 12 then ' chart object
prop.GraphLayout.Frame.ObjectID = Replace(id, "_fixed", "")
else
prop.Layout.Frame.ObjectID = Replace(id, "_fixed", "")
end if
end if
objects(i).SetProperties prop
end if
end if
next
end sub