我尽量解释
我需要通过vbscript宏隐藏几张纸,这样当我打印文档时它们就不可见了。我可以通过其ID检索工作表然后隐藏/显示它吗?
示例:
功能隐藏
Dim strValueToDisplay
strValue = split(ActiveDocument.Variables("vHideSheetList").GetContent().String,",")
for each sheetId in strValue
'msgbox(sheetId)
ActiveDocument.Sheets(sheetId).Hide
next
功能显示
Dim strValueToDisplay
strValue = split(ActiveDocument.Variables("vHideSheetList").GetContent().String,",")
for each sheetId in strValue
'msgbox(sheetId)
ActiveDocument.Sheets(sheetId).Show
next
THX!