Added feature 723: Insert Carriage return after automatic insertion of screenshot to a word document.

This commit is contained in:
RKrom 2014-05-12 12:50:57 +02:00
commit b0d7ce09f4
3 changed files with 24 additions and 0 deletions

View file

@ -145,6 +145,7 @@ namespace Greenshot.Interop.Office {
shape.LockAspectRatio = MsoTriState.msoTrue;
}
selection.InsertAfter("\r\n");
selection.MoveDown(WdUnits.wdLine, 1, Type.Missing);
return shape;
}
}

View file

@ -633,4 +633,26 @@ namespace Greenshot.Interop.Office {
msoScaleFromMiddle = 1,
msoScaleFromBottomRight = 2
}
/// <summary>
/// Units: http://msdn.microsoft.com/en-us/library/office/bb214015(v=office.12).aspx
/// </summary>
public enum WdUnits {
wdCell = 12,
wdCharacter = 1,
wdCharacterFormatting = 13,
wdColumn = 9,
wdItem = 16,
wdLine = 5,
wdParagraph = 4,
wdParagraphFormatting = 14,
wdRow = 10,
wdScreen = 7,
wdSection = 8,
wdSentence = 3,
wdStory = 6,
wdTable = 15,
wdWindow = 11,
wdWord = 2
}
}

View file

@ -87,6 +87,7 @@ namespace Greenshot.Interop.Office {
public interface ISelection : ICommon {
IInlineShapes InlineShapes { get; }
void InsertAfter(string text);
int MoveDown(object Unit, object Count, object Extend);
}
/// <summary>