Leth
asked on
command button in ms Excell that loads a help file in ms word
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
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
ASKER
okay that makes sense, apart from the reference part .
what do you mean?
the word libary?
cheers!!!
what do you mean?
the word libary?
cheers!!!
ASKER
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
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
ASKER
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(olMailI tem)
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???
' 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(olMailI
With maiMail
' Get an address from the user.
Set recMessage = .Recipients.Add(InputBox("
' 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???
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.
.Attachments.Add "c:\test\test.xls"
You have to save your excel sheet first in order to attach it.
ASKER
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!!!
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!!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
as usual from this place, another excellent answer from wonderful people who dont mind explaining easy concepts to dum people
dim objWord as Word.Application
set objWord = new Word.Application