当前位置:首页教育技巧word技巧word排版

怎么把许多图片放到word文档中

2024-07-18 10:29:07


1.怎么把许多图片放到word文档中

1、acdsee可以打印缩略图,带文件路径的2、也可以用如下的word宏 Sub 宏1() ' '成都豺狼 ' pth = "C:\\My Pictures\\" '读入文件的路径 fln = Dir(pth & "*.jpg") '文件类型,没有其它文件,可以只用路径 wdth = ActiveDocument.PageSetup.PageWidth - ActiveDocument.PageSetup.LeftMargin - ActiveDocument.PageSetup.RightMargin hght = ActiveDocument.PageSetup.PageHeight - ActiveDocument.PageSetup.TopMargin - ActiveDocument.PageSetup.BottomMargin a = ActiveDocument.Paragraphs.LineSpacing cnt = 0 Do While Len(fln) > 0 If cnt Mod 6 = 0 Then Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.TypeParagraph'Selection.InsertBreak Type:=wdPageBreak ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=3, NumColumns:= _ 4, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _ wdAutoFitFixed Selection.Tables(ActiveDocument.Tables.Count).Select Selection.SelectCell Selection.ParagraphFormat.Alignment = Selection.Cells.VerticalAlignment = ActiveDocument.Tables(ActiveDocument.Tables.Count).AllowAutoFit = False ActiveDocument.Tables(ActiveDocument.Tables.Count).Columns(3).Select Selection.Orientation = ActiveDocument.Tables(ActiveDocument.Tables.Count).Columns(1).Select Selection.Orientation = ActiveDocument.Tables(ActiveDocument.Tables.Count).Columns(1).Width = wdth * 0.05 ActiveDocument.Tables(ActiveDocument.Tables.Count).Columns(2).Width = wdth * 0.45 ActiveDocument.Tables(ActiveDocument.Tables.Count).Columns(3).Width = wdth * 0.05 ActiveDocument.Tables(ActiveDocument.Tables.Count).Columns(4).Width = wdth * 0.45 ActiveDocument.Tables(ActiveDocument.Tables.Count).Rows.Height = (hght - a - a) * 0.33 tablebili = ActiveDocument.Tables(ActiveDocument.Tables.Count).Columns(2).Width / ActiveDocument.Tables(ActiveDocument.Tables.Count).Rows.Height End If Selection.TypeText Text:=fln Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.InlineShapes.AddPicture FileName:= _ pth & fln, LinkToFile:=False, _ SaveWithDocument:=True cnt = ActiveDocument.InlineShapes.Count bili = ActiveDocument.InlineShapes(cnt).Width / ActiveDocument.InlineShapes(cnt).Height If tablebili > bili Then '控制图形按纵横比例显示,要拉伸就直接用行高列宽 ActiveDocument.InlineShapes(cnt).Height = ActiveDocument.Tables(ActiveDocument.Tables.Count).Rows.Height ActiveDocument.InlineShapes(cnt).Width = ActiveDocument.InlineShapes(cnt).Height * bili Else ActiveDocument.InlineShapes(cnt).Width = ActiveDocument.Tables(ActiveDocument.Tables.Count).Columns(2).Width ActiveDocument.InlineShapes(cnt).Height = ActiveDocument.InlineShapes(cnt).Width / bili End If Selection.MoveRight Unit:=wdCharacter, Count:=1 fln = Dir DoEvents Loop End Sub。

相关信息


电脑版

【免责声明】本站信息来自网友投稿及网络整理,内容仅供参考,如果有错误请反馈给我们及时更正,对文中内容的真实性和完整性本站不提供任何保证,不承但任何责任。
版权所有:学窍知识网 Copyright © 2011-2024 www.at317.com All Rights Reserved .