flint2 писал(а):
EVV, Круче сформулировать просто невозможно!
Откуда она возьмётся?
https://yadi.sk/d/PWKJj2oSk6N3JA
Спасибо!
Ответов: 2
Рейтинг: 0
|
|||
flint2 писал(а):
EVV, Круче сформулировать просто невозможно! Откуда она возьмётся? https://yadi.sk/d/PWKJj2oSk6N3JA Спасибо! |
|||
карма: 0 |
|
Ответов: 2059
Рейтинг: 132
|
|||
EVV, На здоровье!
|
|||
карма: 6 |
|
Ответов: 775
Рейтинг: 168
|
|||
Как вариант, можно использовать стандартные компоненты.
Остальные команды DDE для Word Word DDE commands [FileNew] Creates a new empty document [FileNew .NewTemplate = 0, .Template = Template$] Creates a new document or template .NewTemplate = 0 (or omitted) = new document 1 New template .Template = The name of the template or document on which to base the new document or template, or the name of the wizard to run. You *must* specify the complete path to the template file. [FileSaveAs “c:\temp\test.doc“, 0] Save active document as “c:\temp\test.doc“ [FileSave] Save active document [FileClose] Close active document [FileExit Mode] Quits Winword. Mode: 0 Prompts the user to save documents 1 Saves all edited documents before quitting. 2 Quits without saving changed documents. [FilePrintDefault] Prints the active document using the current settings in the Print and Print Setup dialog boxes (File menu) and on the Print tab in the Options dialog box (Tools menu). [InsertPicture(“c:\pic1$$$$.bmp“)] Inserts picture file at current cursor position [Insert(“Hello“)] Inserts text „Hello“ [Insert “Hi HTBasic users“] Inserts text „Hi HTBasic users“ [InsertFrame] Inserts an empty frame, or frames the selected text, graphic, or both. If there is no selection, Word inserts a 1-inch - square frame at the insertion point (the frame appears as a square in page layout view). You can change the dimensions of the frame with FormatFrame. [RemoveFrames] Removes all frames in the selection. Note that borders, applied automatically when you insert a frame around text, are not removed. [FormatBordersAndShading.Shadow=1,.TopBorder=1, .LeftBorder=1, .BottomBorder=1, .RightBorder=1, .ApplyTo=0] Sets border and shading formats for the selected paragraphs, table cells, or graphic. The arguments for the FormatBordersAndShading statement correspond to the options in the Borders And Shading dialog box (Format menu). .Shadow Specifies whether to apply a shadow to the border of paragraphs or a graphic: 0 (zero) Does not apply a shadow. 1 Applies a shadow.You cannot apply a shadow to a table or table cells. If you want to apply a shadow to a paragraph or graphic, the item must have—or you must specify—matching right, left, top, and bottom borders. Otherwise, an error occurs. .TopBorder, .LeftBorder, .BottomBorder, .RightBorder The line style for the border on the top, left, bottom, and right edges of paragraphs, cells, or a graphic, in the range 0 (zero), which is no border, through 11 (for a list of line styles and their values, see BorderLineStyle). .ApplyTo If the selection consists of more than one of the following items, specifies to which item or items the border format is applied: 0 (zero) Paragraphs 1 Graphic 2 Cells 3 Whole table If .ApplyTo is omitted, the default for the selection is assumed. .TopColor, .LeftColor, .BottomColor, .RightColor, .HorizColor, .VertColor The color to be applied to the specified borders, in the range from 0 (zero), which is Auto, through 16 (for a list of colors and their values, see CharColor). [InsertBreak.Type=x] Inserts a break. .Type values: 0 (zero) or omitted Page break 1 Column break 2 Next Page section break 3 Continuous section break 4 Even Page section break 5 Odd Page section break 6 Line break (newline character) [InsertDateTime .InsertAsField = number] Inserts the current date, time, or both, as either text or a TIME field. .InsertAsField Specifies whether Word inserts the information as a TIME field: 0 (zero) Word inserts the information as text. 1 Word inserts the information as a TIME field. Omitted Word inserts the information according to the current setting of the Insert As Field check box in the Date And Time dialog box (Insert menu). [InsertPageNumbers .Type = 0, .Position = 2, .FirstPage = 0] Inserts page number into the header or footer. .Type: 0 = header, 1= footer .Position: 0 = Left, 1=Center, 2=Right 3=Inside (left on odd pages, right on even pages) 4=Outside (right on odd pages, left on even pages) .Firstpage: If 1, the field is included in the header or footer on the first page. [TableInsertTable .NumColumns = 3, .NumRows = 5, .Format=xx] Inserts a table with .NumColumns columns and .NumRows rows Additional parameter: .Format=xx where xx = One of the predefined formats listed in the Table AutoFormat dialog box (Table menu): 0 (zero) corresponds to the first format listed in the Formats box („none“), 1 corresponds to the second format, and so on. [TableDeleteColumn] Deletes the table column containing the insertion point, or deletes all columns containing part of the selection. If the insertion point or selection is not within a table, an error occurs. [TableDeleteRow] Deletes the row containing the insertion point, or deletes all rows containing part of the selection. If the insertion point or selection is not within a table, an error occurs. [TableDeleteCells .ShiftCells = number] Deletes the selected cells. If the insertion point or selection is not within a table, an error occurs. .ShiftCells: Sets the direction to shift the remaining cells: 0 (zero) Shift the cells left. 1 Shift the cells up. 2 Delete the entire row. 3 Delete the entire column. [TableSelectTable] Selects the entire table containing the insertion point. If the insertion point or selection is not in a table, an error occurs. As the examples in this entry demonstrate, you can use TableSelectTable in combination with other WordBasic statements to move the insertion point reliably to the first cell in a table or to the first character after a table. [InsertPara] Inserts a paragraph mark at the insertion point. [Bold] Toggles bold state [Bold 1] Switches on Bold state [Bold 0] Switches off Bold state [NextCell] [PrevCell] Selects the contents of the next table cell Selects the contents of the previous table cell [Underline] [Underline 1] & [Underline 0] see above Toggles underline state [Italic] [Italic 1] / [Italic 0] see above Toggles italic state [DottedUnderline] [DottedUnderline 1] / [DottedUnderline 0] see above Toggles dottedunderline state [DoubleUnderline] [DoubleUnderline 1] / [DoubleUnderline 0] see above Toggles dottedunderline state [FormatFont(„15“)] Sets font size to 15 points [Font(„Arial“)] Selects font „Arial“ [CharColor x] Sets color of characters to value x. Range: 0..16 Values 0=Auto, specified in the Control Panel (Windows) 1=Black, 2=Blue, 3=Cyan, 4=Green, 5=Magenta, 6=Red, 7=Yellow, 8=White, 9=Dark Blue, 10=Dark Cyan, 11=Dark Green, 12=Dark Magenta, 13=Dark Red, 14=Dark Yellow, 15=Dark Gray, 16=Light Gray [ResetChar x] 0 (zero) If the selected text contains any manual character formatting 1 If the selected text contains no manual character formatting [NormalStyle] Applies the Normal style to the selected paragraphs [Style Style$] Applies a style to the selected paragraphs. Example: [Style “Heading 1“] FormatStyle .Name = “TestMe“, .Define FormatDefineStyleFont .Points = “10“, .Bold = 1, .SmallCaps = 1 .Name The name of the style. .Delete Deletes the specified style. .BasedOn Specifies an existing style on which to base the specified style. .Type specifies the type for a new style,: 0 (zero) or omitted Paragraph 1 Character .FileName The document or template to merge styles to or from. .Define Redefines an existing style or creates a new style with the formats specified in subsequent instructions. .Rename Renames the style specified by .Name to the name specified by .NewName. .Apply Applies the style to the selected paragraphs. [FormatPicture .ScaleX = ““50%““, .ScaleY = ““50%““] Formats a picture using the values .ScaleX and .ScaleY. You must select the picture before you can do this formatting, e.g. using [editgoto .Destination=“G2"] ! go to picture 2 [charright 1,1] ! select the pitcure [LeftPara] The LeftPara statement aligns the selected paragraphs with the left indent. [RightPara] The RightPara statement aligns the selected paragraphs with the right indent. [CenterPara] Centers the selected paragraphs. [JustifyPara] The JustifyPara statement justifies the selected paragraphs. [LineUp] Cursor 1 line up [LineDown] Cursor 1 line down [CharLeft] 1 character left [CharRight] 1 char right [EditSelectAll] Selects whole document [EditGoto] Jumps to start of document [EditGoto .Destination=“Bookmark1"] Jumps to „Bookmark1“ [EditGoto .Destination=“L6"] Jumps to line 6 on current page [EditGoto .Destination=“L+2"] Relative jump to the 2nd line after the current line [EditGoto .Destination=“L-1"] Relative jump to the previous line [EditGoto .Destination=“S3"] Jumps to section 3 on current page [EditGoto .Destination=“P5"] Jumps to page 5 [EditGoto .Destination=“F’TIME“] Jumps to next field called TIME [EditGoto .Destination=“T2"] Jumps to table 2 [EditGoto .Destination=“G7"] Jumps to graphic 7 [EditGoto .Destination=“Q4"] Jumps to equation 4 [FilePrintPreview] Printer Preview [ViewNormal] „Normal“ page view [ViewPage] „Page Layout“ view [EditUndo] Undo last action [EditRedo] Redo last action [EditPaste] Paste data from clipboard [EditCut] Cut selected data to clipboard [EditCopy] Copy selected data to clipboard [DeleteWord] Deletes the word immediately following the insertion point [DeleteBackWord] Deletes the word immediately preceding the insertion point [EditClear clear] Deletes the selection or a specified number of characters. If clear is > 0 the appropriate number of characters to the right of the insertion point will be deleted. If clear is < 0 the appropriate number of characters to the left of the insertion point will be deleted. [EndOfDocument] Jumps to the last line of the document [EndOfLine] Jumps to the end of the current line [EndOfLine 1] Marks text from current cursor position to the end of the line [StartOfLine] Jumps to the begin of the current line [StartOfLine 1] Marks text from current cursor position to the begin of the line [EndOfDocument 1] Marks text from current cursor position to the end of the document [StartOfDocument 1] Marks text from current cursor position to the begin of the document [EndOfWindow] Marks current page content [CharRight 1,1] Marks next character [CharRight 5,1] Marks next 5 characters [CharLeft 1,1] Marks previous character [CharLeft 3,1] Marks previous 3 characters [WordRight 1,1] Marks next word [WordRight 8,1] Marks next 8 words [WordLeft 1,1] Marks previous word [WordLeft 2,1] Marks previous 2 words [VLine x] Scrolls the document xx lines (x>0 = scroll down, x<0 scroll up) [VPage x] Scrolls the document xx screens (x>0 = scroll down, x<0 scroll up) [FormatBullet.Indent=5,.Font=“Fontname“, .CharNum=xx, .Points=10] Adds bullets to the selected paragraphs. .Points The size of the bullets, in points. .Color The color of the bullets .CharNum The sum of 31 and the number corresponding to the position of the symbol in the Symbol dialog box (Insert menu), counting from left to right. For example, to specify an omega (), which is at position 56 on the table of symbols in the Symbol font, set .CharNum to 87. .Font The name of the font containing the symbol. Names of decorative fonts appear in the Font box in the Symbol dialog box. [ToggleFull] Toggles full screen mode on and off. [ViewZoom100] Switches to normal view and sets magnification to 100 percent for the active document and new documents. [ViewZoomWholePage] Sets magnification so the entire page is visible in page layout view. ViewZoomWholePage switches to page layout view if the active document is in another view. [AppMinimize] Minimizes Word application window [AppMaximize] Maximizes Word application window [AppRestore] Restores Word application window [AppHide] Hides Word application window from task bar [AppShow] Shows Word application window (after hiding) [AppActivate] Brings Word application window to front Редактировалось 2 раз(а), последний 2020-06-16 10:46:51 |
|||
карма: 15 |
|
Ответов: 775
Рейтинг: 168
|
|||
Небольшой пример нестандартной вставки таблицы в документ Word с заголовками столбцов на каждой странице, а также вставка колонтитулов.
Редактировалось 1 раз(а), последний 2020-08-15 22:41:27 |
|||
карма: 15 |
|
Ответов: 952
Рейтинг: 4
|
|||
Gunta,
Как вариант, можно использовать стандартные компоненты.
Не работает. |
|||
карма: 0 |
|
Ответов: 775
Рейтинг: 168
|
|||
user_asm писал(а): Не работает.Проверил на двух разных ноутбуках, всё прекрасно работает. При запуске программы у тебя открывается Microsoft Word? |
|||
карма: 15 |
|
Ответов: 775
Рейтинг: 168
|
|||
Пример передачи данных из Hiasm в документы MS office.
Пример проверен на Window 7(32) Powershell версии 3 и Window 10(64) Powershell версии 5 |
|||
карма: 15 |
| ||
файлы: 1 | Hiasm-PS-MSoffice.zip [8.3KB] [437] |