Chinaunix首页 | 论坛 | 博客
  • 博客访问: 376877
  • 博文数量: 1051
  • 博客积分: 53280
  • 博客等级: 大将
  • 技术积分: 6670
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-09 13:21
文章分类

全部博文(1051)

文章存档

2011年(1)

2008年(1050)

我的朋友

分类:

2008-09-09 15:47:06



  Using LotusScript, how can you extract to a directory all the files attached to a document\'s Rich Text Field?
  
  
  The sample script below illustrates one way to accomplish this.
  
  Note: In order for this script to execute as intended, the fields and documents must have the names used below.
  
  Dim Doc as NotesDocument
  Dim RTItem as variant
  
  \' ... Set all the relations ...
  \' ... Retrieve the field which contains the attachment
  Set RTItem = Doc.GetFirstItem(\"RichTextField\")
  \' ... Test if object exists in the richtextfield
  If Isarray( RTItem.EmbeddedObjects) Then
  \' ... Scan all the objects on the richtextfield
  Forall EmbedObject In RTItem.EmbeddedObjects
  \' ... If they are attachment then detach them
  If ( EmbedObject.Type = EMBED_ATTACHMENT ) Then
  Call EmbedObject.ExtractFile( \"c:\\\" & EmbedObject.source )
  End If
  End Forall
  End If
  
  


  


 相关文章  热门文章











--------------------next---------------------

阅读(100) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~