diff --git a/TSVbaDocxHelp.docx b/TSVbaDocxHelp.docx index d50a77c..0ad56c9 100644 Binary files a/TSVbaDocxHelp.docx and b/TSVbaDocxHelp.docx differ diff --git a/docx/TSDocxInlineShapes.tsf b/docx/TSDocxInlineShapes.tsf index 3cbe418..ef6ff2e 100644 --- a/docx/TSDocxInlineShapes.tsf +++ b/docx/TSDocxInlineShapes.tsf @@ -84,7 +84,7 @@ Begin paragraph := Range.InsertNewParagraph(); pic := docx_.AddPicture(picture, paragraph.Object()); document_.Paragraphs.AddParagraph(paragraph.Index(), pic.Root()); - paragraph.Range.Clear(true); + paragraph.Range.Delete(); self.SerializeInlineShapes(); run := pic.Root().FirstChildElement("w:r"); trun := TOfficeObj("TRun"); diff --git a/docx/TSDocxRange.tsf b/docx/TSDocxRange.tsf index 3cd2e73..90e5d20 100644 --- a/docx/TSDocxRange.tsf +++ b/docx/TSDocxRange.tsf @@ -785,3 +785,13 @@ Function TSDocxRange.ReadStart(); Begin return range_obj_.GetStart(); End; + +Function TSDocxRange.InsertFile(FileName, Range, ConfirmConversions, Link, Attachment); +Begin + alias := ""; + paragraph := self.InsertNewParagraph(); + docx_.InsertFile(alias, FileName, paragraph.Root()); + paragraph.Range.Delete(); + document_.Paragraphs.Init(docx_); +End; +