Я пытаюсь создать конверт в MS Word.Следующий код создаст конверт, но я получаю «разрыв раздела (Следующая страница)» вверху этой страницы.Я хотел бы удалить это.
oDoc = oWord.Documents.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing);
oDoc.Activate();
object ExtractAddress = false;
object Address = "Address" ;
object AutoText = "AutoText" ;
object OmitReturnAddress = false;
object ReturnAddress = "ReturnAddress" ;
object ReturnAutoText = "ReturnAutoText";
object PrintBarCode = false;
object PrintFIMA = false;
object Size = "E65";
object Height = 110;
object Width = 220;
object FeedSource = true;
object AddressFromLeft = 2;
object AddressFromTop = 2;
object ReturnAddressFromLeft = 2;
object ReturnAddressFromTop = 2;
object DefaultFaceUp = true;
object DefaultOrientation = Microsoft.Office.Interop.Word.WdEnvelopeOrientation.wdCenterPortrait;
object PrintEPostage = false;
object Vertical = false;
object RecipientNamefromLeft = Missing.Value;
object RecipientNamefromTop = Missing.Value;
object RecipientPostalfromLeft = Missing.Value;
object RecipientPostalfromTop = Missing.Value;
object SenderNamefromLeft = Missing.Value;
object SenderNamefromTop = Missing.Value;
object SenderPostalfromLeft = Missing.Value;
object SenderPostalfromTop = Missing.Value;
oDoc.Envelope.Insert(ref ExtractAddress, ref Address, ref AutoText,
ref OmitReturnAddress, ref ReturnAddress, ref ReturnAutoText,
ref PrintBarCode, ref PrintFIMA, ref Size, ref Height,
ref Width, ref FeedSource, ref AddressFromLeft, ref AddressFromTop,
ref ReturnAddressFromLeft, ref ReturnAddressFromTop, ref DefaultFaceUp,
ref DefaultOrientation, ref PrintEPostage, ref Vertical,
ref RecipientNamefromLeft, ref RecipientNamefromTop,
ref RecipientPostalfromLeft, ref RecipientPostalfromTop,
ref SenderNamefromLeft, ref SenderNamefromTop, ref SenderPostalfromLeft,
ref SenderPostalfromTop);