I have 2 problems.
- I have a form and a button.I want to open a word document every time i click on this button.
What do I have to write?
-I want to move a cursor in a textbox located in a form. How can I use Windows API?
Printable View
I have 2 problems.
- I have a form and a button.I want to open a word document every time i click on this button.
What do I have to write?
-I want to move a cursor in a textbox located in a form. How can I use Windows API?
can help you with the word section:
add a reference to word..
projects --> add reference --> com tab
in code:
Dim oWord As New Word.Application
'application
oWord.Documents.Open(Application.StartupPath & "\china.doc")
oWord.WindowState = Word.WdWindowState.wdWindowStateMaximize
oWord.Visible = True
when you close the app make sure to
run this code as well or else your'll get 100 winword.exe's running in memory.
oWord.Documents.Close()
oWord.Quit()
oWord = Nothing
Hello!
It doesn't work because I have no reference to word.
Do you have another idea?
Thank you for understanding.
Try begging one of your programmer friends to share the main DLL with you.Quote:
Originally posted by sandrino
Hello!
It doesn't work because I have no reference to word.
Do you have another idea?
Thank you for understanding.
This will open the doc file with whatever application is associated with that extension.
VB Code:
Process.Start(Application.StartupPath & "\china.doc")
If it gives you trouble then Process is in the System.Diagnostic namespace.