VB how to save data to Word, and print it

Updated on technology 2024-02-28
12 answers
  1. Anonymous users2024-02-06

    Some mobile phone models have built-in Polaris Office Office 5 office software that supports the Word document function, and you can also try it with third-party office software.

  2. Anonymous users2024-02-05

    Simple approach. 。

    Add a richtextbox to the form

    **:\

  3. Anonymous users2024-02-04

    First use word to create a "template", set the ** and format of the drawing, and then bring up the "form" toolbar, add the "text form field" (that is, the text box) where you want to receive the value transmitted by VB, and click the "field shading" on the "form" toolbar to remove the shading of the field, otherwise it will not look good. When joining a domain, remember to name the "bookmark" in the properties of each "domain" (which is actually equivalent to the "name" in VB), and save the exit (let's say c:.

    Create a new project in VB and reference Microsoft Word X Object Library, add a text box corresponding to the field in Word in the form, add a command, and add something like the following (I only used a text box as an example, you can expand it yourself):

    private sub command1_click()dim doc1 as

    set doc1 = new

    c:\")text1").result =

    set doc1 = nothing

    end sub

    In this way, I pass the text value from text1 in the form into the word file named .

  4. Anonymous users2024-02-03

    Post on the Tech Forum.

  5. Anonymous users2024-02-02

    Just create a word object and manipulate it.

  6. Anonymous users2024-02-01

    Word or TXT in XML format are text files. You only need to fill in the format according to the format, and the content that needs to be output is put together.

  7. Anonymous users2024-01-31

    It is easiest to save to a txt file, if you want to export to word, you need to reference the word object in the project and manipulate the word object. As for why you want to set it invisible, because when the program references a word or excel object, it is equivalent to opening a word or excel, which is not what the program wants, the program only references the object and performs automatic operations on the object, and does not need to see the object.

  8. Anonymous users2024-01-30

    You can just save the txt file just by changing the suffix to doc, and word can read the txt text directly.

  9. Anonymous users2024-01-29

    Don't part reference excel. word, how did you open word, tell me first, let me learn it.

    Printing is nothing more than print

  10. Anonymous users2024-01-28

    to transteel

    You're not fooling people, are you? I suspect you of scoring

  11. Anonymous users2024-01-27

    To write "result=" in the doc document, it is not possible to write it directly, first add a label to the second line of the doc, name the label, for example: result, set a program-level variable in the program, for example: jg, assign a value to jg:

    jg = "Result =" & "*" & "="& Finally, enter the variable jg in the label in the doc (note that the doc must be opened in the program and written by the program).

  12. Anonymous users2024-01-26

    The second line shows that ** can be written like this:

    text3="Result=" &=" &

    Then, you'll be able to see the content of the result in text3.

Related questions
15 answers2024-02-28

It's very simple, select all the text toolbar** Convert text to** OK, then it will show the Chinese and English separately arrangement**, and then select all the text, click the toolbar** Convert**Convert to text OK, then ** is gone. All that's left is a neat two-line line of text. This method is simple, but the disadvantage is that it is not easy to master, and there is a certain skill in adjusting the width of the column, which is not clear here. >>>More

10 answers2024-02-28

Horizontal top or top top of the page?

Hitting directly is horizontally topped. >>>More

8 answers2024-02-28

Incorporating moral education into a day's activities is the most effective way to do it in everyday lifeEarly childhood teachersIt is necessary to be good at infiltrating the cultivation of children's good living habits and behavioral habits into preschool education. >>>More

7 answers2024-02-28

The string is immutable, and the list is mutable.

That is to say, once the meaning of the string is determined, it cannot be changed, but the list can. >>>More

15 answers2024-02-28

It's very simple, select a single province, (note: you want to determine which province determines the new shapefile, choose which, select each province once), and then right-click the mouse - export data - select the export type as shapefile - save (ok), it's very simple. Do you give points? >>>More