怎样控制word文档里一个指定的图片不能被选定移动和移动?

flyintosky555 2004-09-19 03:33:35
如题!
...全文
1251 9 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
techgopher 2004-09-22
  • 打赏
  • 举报
回复
你要把其他无需保护的节设置一下再保护文档。

Selection.InsertBreak Type:=wdSectionBreakContinuous
Selection.InlineShapes.addpicture "C:\Documents and Settings\All Users\Documents\My Pictures\示例图片\Blue hills.jpg"
Selection.InsertBreak Type:=wdSectionBreakContinuous
ActiveDocument.Sections(1).ProtectedForForms = False
ActiveDocument.Sections(2).ProtectedForForms = True
ActiveDocument.Sections(3).ProtectedForForms = False
ActiveDocument.Protect wdAllowOnlyFormFields, Password:="password"

flyintosky555 2004-09-21
  • 打赏
  • 举报
回复
楼上的代码倒是可以,不过把整个文档都保护了,不能进行其他操作了
techgopher 2004-09-21
  • 打赏
  • 举报
回复
Selection.InsertBreak Type:=wdSectionBreakContinuous
Selection.InlineShapes.addpicture "C:\Documents and Settings\All Users\Documents\My Pictures\示例图片\Blue hills.jpg"
Selection.InsertBreak Type:=wdSectionBreakContinuous
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.Sections(1).ProtectedForForms = True
ActiveDocument.Protect wdAllowOnlyFormFields, Password:="password"
flyintosky555 2004-09-21
  • 打赏
  • 举报
回复
ActiveDocument.Protect wdAllowOnlyFormFields, Password:="password"
这句把整个文档保护了,我已经试过了
techgopher 2004-09-21
  • 打赏
  • 举报
回复
你自己再调一调,不应该是整个文档都保护了的。
techgopher 2004-09-20
  • 打赏
  • 举报
回复
文档保护。在图片前后插入分节符,然后对该节实行窗体保护。
jam021 2004-09-20
  • 打赏
  • 举报
回复
关注,帮顶
flyintosky555 2004-09-20
  • 打赏
  • 举报
回复
请给出代码啊,拜托
flyintosky555 2004-09-19
  • 打赏
  • 举报
回复
?

2,503

社区成员

发帖
与我相关
我的任务
社区描述
VBA(Visual Basic for Applications)是Visual Basic的一种宏语言,是在其桌面应用程序中执行通用的自动化(OLE)任务的编程语言。
社区管理员
  • VBA
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧