word中防拷贝问题
这里有一段实现word防拷贝的代码,可是其中少了一个自编函数和提取程序段,请各位高手帮忙补全,不胜感激!
Function hidebyte()
Dim j As Integer
Dim i As Integer
Dim ch(1 to N) As Byte'数组按字节放入待隐藏的秘密信息
Dim chbyte As Byte
'........... '给ch(1)到ch(n)赋值的语句省略
Selection.MoveRight unit:=wdCharacter,count:=8,Extend:=wdExtend
with selection.font
.nameAscii="Basemic Times"
end with '连续8个字符为“Basemic Times”,为提取秘密字节设置的开始标志
selection.moveRight unit:=wdCharacter,count:=1
For j=1 to n '每次循环隐藏一字节
m=&H80
for i=1 to 8 '每次循环隐藏一比特二进制位
Selection.moveRight unit:=wdCharacter,count:=1,Extend:=wdExtend
With selection.font '根据比特位的1或0改变英文字体
chbyte=ch(j) and m
if chbyte=m then
.nameAscii="Times New Roman"
Else
.nameAscii="Basemic Times"
end if
m=shiftRight(m,1) ‘shiftRight()为自编右移位函数
end with
selection.moveleft unit:=wdCharacter,count:=1
selection.moveright unit:=wdCharacter,count:=1
next i
next j
end function
[解决办法]
不是高手,帮你顶一下