word VBA 以下代码实现文本信息的隐藏和提取,可以隐藏,但是无法正确提取,请各路大神指教如何修改 30

信息隐藏Subopenfile()DimbAsByteDimiAsIntegerDima,lAsStringOpen"C:\Users\Administrator\Des... 信息隐藏
Sub openfile()
Dim b As Byte
Dim i As Integer
Dim a, l As String
Open "C:\Users\Administrator\Desktop\VBA\密文.txt" For Binary As #256
l = LOF(256)
For i = 1 To l
Get #256, , b
a = b Mod 2
If (a = 0) And (b <> 0) Then
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
With Selection.Font
.Scaling = 110
End With
End If
If b = 0 Then
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
With Selection.Font
.Scaling = 110
End With
End If
Selection.MoveRight
b = b \ 2
Next i
Close #256
End Sub

信息提取
Sub newfile()
Dim b As Byte
Dim i, j As Integer
Dim s As String
Open "C:\Users\Administrator\Desktop\VBA\解密文档.txt" For Binary As #257
Selection.EndKey Unit:=wdStory, Extend:=wdExtend
With Selection.Characters
s = .Count
End With
Selection.HomeKey
For j = 1 To s \ 8
b = 0
For i = 1 To 8
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
With Selection.Font
If .Scaling = 100 Then
b = b + 2 ^ (i - 1)
End If
End With
Selection.MoveRight
Next i
If b <> 255 Then
Put #257, , b
End If
Next j
Close #257
End Sub
展开
 我来答
wangdao_1314
2013-04-22
知道答主
回答量:45
采纳率:0%
帮助的人:18.6万
追问
您提供的网址打不开
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式