Solved

Where to learn VB Application for Word on Internet

Posted on 2001-09-14
8
200 Views
Last Modified: 2012-06-27
Hi,I am searching for learning VB Application expecially for MS Word that create hyperlinks on word documents. Can somebody help me ?
0
Comment
Question by:Imelda
8 Comments
 
LVL 49

Accepted Solution

by:
Ryan Chong earned 30 total points
ID: 6481839
Hi lmelda,

Some links here:

http://www.learnthat.com/courses/computer/word/

___________________________________

> Insert a hyperlink that goes to another document, file, or Web page:

You can create a hyperlink that goes to an existing file or to a new file. After you've specified a name for the new file, you can choose to open the file for editing immediately or come back to it later. Either way, the file is created for you.

Select the text or drawing object you want to display as the hyperlink, and then click Insert Hyperlink .

(Or press Ctrl+K)


Do one of the following:
To link to an existing file or Web page, click Existing File or Web Page under Link to.

To link to a file that you haven't created yet, click Create New Document under Link to.

Do one of the following:
If you clicked Existing File or Web Page in step 2, locate and select the file you want to link to.

If you clicked Create New Document in step 2, type a name for the new file. You can also specify the path to the new file and choose whether you want to open the new file for editing now or later.

To assign a tip to be displayed when you rest the mouse over the hyperlink, click Screen Tip and then type the text you want. Word uses the path or address of the file as the tip if you do not specify one.


Click OK twice.
Notes

You can quickly create a hyperlink to a Web page without knowing the address. Click Web page to switch to your Web browser, open the World Wide Web page you want, and then switch back to Word.


If you know the address to an existing Web page, you can type it directly into the document. For example, type www.microsoft.com, and Word creates the hyperlink for you.
0
 
LVL 49

Expert Comment

by:Ryan Chong
ID: 6481840
Or you want to create a hyperlink programmically?
0
 

Author Comment

by:Imelda
ID: 6481932
Yes, I want to create a hyperlink programmically because there are a link plus numbers that increasing on next the link.
0
 
LVL 49

Expert Comment

by:Ryan Chong
ID: 6481979
Hi lmelda,

Try this:

Dim Word As Word.Application
Dim Doc As Word.Document


Private Sub Command1_Click()
    Set Word = CreateObject("Word.Application")
    Set Doc = Word.Documents.Add
   
    Word.Selection.TypeText "Hello World"
    Word.Selection.Hyperlinks.Add Anchor:=Selection.Range, Address:="http:\\www.microsoft.com"
    Doc.SaveAs "D:\eee.doc"
    Doc.Close
    Word.Quit
    Set Doc = Nothing
    Set Word = Nothing
End Sub

'Hope will help.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 49

Expert Comment

by:Ryan Chong
ID: 6482020
Hi,

Here is the example from M$ Word's help:

Add Method (Hyperlinks Collection) Example

This example turns the selection into a hyperlink to the Microsoft address on the World Wide Web.

ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, _
    Address:="http:\\www.microsoft.com"
This example turns the selection into a hyperlink that links to the bookmark named "MyBookMark" in MyFile.doc.

ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, _
    Address:="C:\My Documents\MyFile.doc", SubAddress:="MyBookMark"
This example turns the first shape in the selection into a hyperlink.

ActiveDocument.Hyperlinks.Add Anchor:=Selection.ShapeRange(1), _
    Address:="http:\\www.microsoft.com"

'Hope will help.
0
 
LVL 1

Expert Comment

by:ncw
ID: 6482965
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7208405
Hi Imelda,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept ryancys's comment(s) as an answer.

Imelda, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7241216
Per recommendation, force-accepted.

Netminder
CS Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now