?
Solved

command button in ms Excell that loads a help file in ms word

Posted on 2003-02-20
8
Medium Priority
?
144 Views
Last Modified: 2010-05-01
hi there,

ive put a command button on my excel worksheet that i want to link to a help file i wrote in word,
i looked at the help file but it realy dindt help

i think i need to use this  ActivateMicrosoftApp (xlMicrosoftWord)


but cant get it to work

any ideas???


cheers

Leth
0
Comment
Question by:Leth
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 2

Expert Comment

by:NPluis
ID: 7987398
reference the word lib. then
dim objWord as Word.Application
set objWord = new Word.Application
0
 

Author Comment

by:Leth
ID: 7992205
okay that makes sense,  apart from  the reference part .
what do you mean?

the word libary?
cheers!!!
0
 

Author Comment

by:Leth
ID: 7992255
okay okay i got it to work  at last!
even mananged to work out how to point to a path

thanx!!


can i just ask do you know any where online where i will find info  to make a button that opens an outlook window and attaches the excel file to it?

thanx for any help

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Leth
ID: 8015151
Private Sub cmdsend_Click()
' This procedure is a brief sample showing
' how to automate Outlook.

' Remember to set a reference to the most current available
' Microsoft Outlook oject library.

    Dim appOutl As Outlook.Application
    Dim maiMail As MailItem
    Dim recMessage As Recipient
    Dim booRecip As Boolean
   
    ' Set a reference to the Outlook Application object.
    Set appOutl = New Outlook.Application
   
    ' Set a reference to the MailItem object.
    Set maiMail = appOutl.CreateItem(olMailItem)
   
    With maiMail
        ' Get an address from the user.
        Set recMessage = .Recipients.Add(InputBox("Enter name of message recipient", "Recipient Name"))
       
        ' Attempt to resolve the recipient against an address book.
        booRecip = recMessage.Resolve
       
        ' Add subject and body text.
        .Subject = "Testing mail by Automation"
        .Body = ActiveDocument.Content

       
        ' Send the mail.
        .Send
   
    End With
   
    ' Close object references.
    Set appOutl = Nothing
    Set maiMail = Nothing
    Set recMessage = Nothing

 End Sub


i used this code but it didnt like   this line
     .Body = ActiveDocument.Content
said there was no active document
ehhh???
0
 
LVL 2

Expert Comment

by:NPluis
ID: 8015213
You probably want it as an attachment and not in the body of the message so change the .Body part in:

 .Attachments.Add "c:\test\test.xls"

You have to save your excel sheet first in order to attach it.
0
 

Author Comment

by:Leth
ID: 8015250
okay, say i have e-mailed you the form, and you have opened it from outlook. entered the information and then clicked on the form,
the location of the file isnt going to be on my hard drive  it would be on theirs.
how would i be able to re atach that so it gets sent back

would it still be  .Attachments.add    and then something different,
there is no way of knowing what their drive would be as were all on a network, and use our id numbers as our sharted space on the network

thanx for all your help!!!
0
 
LVL 2

Accepted Solution

by:
NPluis earned 80 total points
ID: 8015353
and why not save it first then with:
Excel.ActiveWorkbook.SaveAs "c:\temp\temp.xls"

then add it:
.Attachments.Add "c:\temp\temp.xls"

0
 

Author Comment

by:Leth
ID: 8016937
as usual from this place,  another excellent answer from wonderful people who dont mind explaining easy concepts to dum people
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

764 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