English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hi world, can anyone tell me the code for opening a document of type Msword and Powerpoint in Visual basic by a simple command button. i.e, I want to launch a .doc filename in microsoft word application.. Thank for your answers... take care.

2007-07-19 05:23:13 · 4 answers · asked by Meven K 1 in Computers & Internet Programming & Design

4 answers

Hi,

You don't need visual basic to do this. You can right click on a any picture or button and add a hyperlink to the object/. Just browse to the file you wish to open. Then, when the presentation is running, if you click the object the file will open.

One way to do it in VBA is the hyperlink method, This is from PowerPoint help:
Using the Hyperlink Object
Use the Hyperlink property to return a hyperlink for a shape. A shape can have two different hyperlinks assigned to it: one that's followed when the user clicks the shape during a slide show, and another that's followed when the user passes the mouse pointer over the shape during a slide show. For the hyperlink to be active during a slide show, the Action property must be set to ppActionHyperlink. The following example sets the mouse-click action for shape three on slide one in the active presentation to an Internet link.
With ActivePresentation.Slides(1).Shapes(3).ActionSettings(ppMouseClick)
.Action = ppActionHyperlink
.Hyperlink.Address = "path or url goes in here"
End With

Put the file path to the document in the quotation marks.

-Jim

2007-07-19 15:45:58 · answer #1 · answered by jimgmacmvp 7 · 0 0

How To Use the WebBrowser Control to Open an Office Document in Visual Basic .NET

http://support.microsoft.com/default.aspx/kb/304643/

Hope this helps

Regards,
Kurt

2007-07-19 06:30:17 · answer #2 · answered by Kurt H. 1 · 0 0

you're no longer particular on your question, yet you could in simple terms ought to create a label field and placed a quantity in there. while you're showing a variable, dim it as an Integer, no longer a double, to come again out as an entire quantity and not a decimal.

2016-09-30 08:00:24 · answer #3 · answered by ? 4 · 0 0

Check this out from Microsoft:

http://support.microsoft.com/kb/129797

2007-07-19 06:30:25 · answer #4 · answered by Anonymous · 0 0

fedest.com, questions and answers