社区
VBA
帖子详情
dsoframer控制word,插入图片
tangsailei
2006-03-24 09:43:52
我下载了一个dsoframer 控件,现在我需要通过该控件控件word ,在其中插入图片,
100分相送(我的等级所能给的最高分了)
请各位高手帮忙。
...全文
561
15
打赏
收藏
dsoframer控制word,插入图片
我下载了一个dsoframer 控件,现在我需要通过该控件控件word ,在其中插入图片, 100分相送(我的等级所能给的最高分了) 请各位高手帮忙。
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
15 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
mtssdlh
2006-04-04
打赏
举报
回复
怎么知道selection所在table的tableindex?
tangsailei
2006-03-27
打赏
举报
回复
自己解决了,感谢 20011521
现贴出来给各位有需要的朋友
Sub AfterAddPicture(Url)
dim m
On Error Resume Next
oframe.ActiveDocument.ActiveWindow.Selection.InlineShapes.AddPicture Url,false,true
m = oframe.ActiveDocument.InlineShapes.Count
m = m + oframe.ActiveDocument.Shapes.Count
oframe.ActiveDocument.InlineShapes(m).ConvertToShape
End Sub
tangsailei
2006-03-27
打赏
举报
回复
再问一个问题,怎样用代码控件多个图片,
第一图片是 ActiveDocument.Shapes("Picture 2").Select
第二图片呢,
。。。
希望有高手能帮忙解答
tangsailei
2006-03-24
打赏
举报
回复
谢谢楼上的兄台
总算解决一个问题。
不知dsoframer.ocx 插入图片的问题可有哪个高手知道。
20011521
2006-03-24
打赏
举报
回复
祝楼主好运
20011521
2006-03-24
打赏
举报
回复
ActiveDocument.Shapes("Picture 2").Select
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.PictureFormat.Brightness = 0.5
Selection.ShapeRange.PictureFormat.Contrast = 0.5
Selection.ShapeRange.PictureFormat.ColorType = msoPictureAutomatic
Selection.ShapeRange.PictureFormat.CropLeft = 0#
Selection.ShapeRange.PictureFormat.CropRight = 0#
Selection.ShapeRange.PictureFormat.CropTop = 0#
Selection.ShapeRange.PictureFormat.CropBottom = 0#
Selection.ShapeRange.Left = 90.4
Selection.ShapeRange.Top = 329.65
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = CentimetersToPoints(0.01)
Selection.ShapeRange.Top = CentimetersToPoints(0.28)
Selection.ShapeRange.LockAnchor = False
Selection.ShapeRange.LayoutInCell = True
Selection.ShapeRange.WrapFormat.AllowOverlap = True
Selection.ShapeRange.WrapFormat.Side = wdWrapBoth
Selection.ShapeRange.WrapFormat.DistanceTop = CentimetersToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceBottom = CentimetersToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceLeft = CentimetersToPoints(0.32)
这是我录制的宏
楼主看看吧
tangsailei
2006-03-24
打赏
举报
回复
这到也是,我也是没办法,自己做一个控件没时间,在说这个控件基本上满足了我的条件,
就差这一个插入图片了,
在CSDN 好像有人实现过,但是没代码,郁闷...
图片 浮在文字上面试过了,录不了宏。
20011521
2006-03-24
打赏
举报
回复
用宏查VBA吧
看图片 浮在文字上面
的代码
dsoframer.ocx 没有用过自己做一个控件算了
别人做的控件很少有人用过的
因为用起来不方便又没有详细的说明
tangsailei
2006-03-24
打赏
举报
回复
请各位用过 dsoframer.ocx 老大帮忙了,分不够的话,可以再开新贴给分。
tangsailei
2006-03-24
打赏
举报
回复
这个我知道,但是在dsoframer 中,没办法实现,
再问一个问题,要怎样才能实现插入的图片浮在文字上面,用代码控制。
20011521
2006-03-24
打赏
举报
回复
Word.ApplicationClass wd=new Word.ApplicationClass();
object oMissing = System.Reflection.Missing.Value;
wd.Documents.Add(ref oMissing,ref oMissing,ref oMissing,ref oMissing);
Word.Document doc=wd.ActiveDocument;
20011521
2006-03-24
打赏
举报
回复
你新建一个Word.ApplicationClass app = new Word.ApplicationClass();
在建一个对象就可以了
tangsailei
2006-03-24
打赏
举报
回复
大哥,我是要在dsoframer 控件里面操作,楼上大哥说的,忘记了一个前提,就是我要怎样才能获得 这个doc 对象。
谢谢
20011521
2006-03-24
打赏
举报
回复
还有一种方法就是
先把图片弄到剪帖板上在粘帖上去
好了给分吧
20011521
2006-03-24
打赏
举报
回复
string fileName = "c://msdn.bmp"; //要插入的图片
Object oMissed = doc.Paragraphs[2].Range; //插入的位置,替换第二段内容
Object oLinkToFile = false; //缺省
Object oSaveWithDocument = true;//缺省
doc.InlineShapes.AddPicture(fieldName, ref oLinkToFile, ref oSaveWithDocument, ref oMissed); //doc为活动文档的名称,即正在操作的文档
Selection.Font.Bold = true
M
WebOffice在线编辑
Word
、Excel、PPT、WPS
本控件不同于其它同类软件,不是基于微软的开放源码
Dso
Frame
r,也不基于OLE,可以解决
Dso
Frame
r及其派生产品的一些稳定性问题 本控件不同于其它同类收费软件,本控件完全免费和界面完全可
控制
。 点聚会定期更新本...
推荐免费好用的Web在线Office(
Word
)编辑控件
//当前光标位置
插入图片
document.all.
Frame
rControl1.InSertFile("http://XX.com/XX.jpg",8); /* 0x31. 文档另存为 HRESULT SaveAs([in] VARIANT strFileName, [in] VARIANT dwFileFormat, [out,retval] long* ...
ActiveX控件
dso
Frame
r的使用(
word
、excel、PPT)
dso
frame
r是微软提供一款开源的用于在线编辑、调用
Word
、 Excel 、PowerPoint等的ActiveX控件。国内很多著名的OA中间件,电子印章,签名留痕等大多数是依此改进而来的。 一、现状 1.官方有
Dso
frame
r 1.3,支持...
web 编辑
word
之
dso
frame
r控件
1.注册
DSO
Frame
r.ocx 开始->运行->regsvr32
DSO
Frame
r.ocx路径(
DSO
Frame
r.ocx 的具体位置如:E://
DSO
Frame
r.ocx) , 系统会提示...新建 */ //新建
Word
document.all.
Frame
rControl1.CreateNew("
Word
.D...
web编辑
word
之
dso
frame
r(二)
dso
frame
r API: /*10.显示或隐藏修订内容 ShowRevisions(long nNewValue) nNewValue = 0 则隐藏修订 = 1 则显示修订 */ //显示修订留痕 document.all.
Frame
rControl1.ShowRevisions(1); //隐藏修订留痕 ...
VBA
2,462
社区成员
10,807
社区内容
发帖
与我相关
我的任务
VBA
VBA(Visual Basic for Applications)是Visual Basic的一种宏语言,是在其桌面应用程序中执行通用的自动化(OLE)任务的编程语言。
复制链接
扫一扫
分享
社区描述
VBA(Visual Basic for Applications)是Visual Basic的一种宏语言,是在其桌面应用程序中执行通用的自动化(OLE)任务的编程语言。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章