|
| View previous topic :: View next topic |
| Author |
Message |
elle0612 Guest
|
Posted: Fri Nov 16, 2007 7:19 pm Post subject: Macro doc + toolbar button via Email? |
|
|
Hi
I'm wondering if it is possible to Email a document with a macro attached,
to arrive at receiver complete with macro button on tool bar to run it.
I need to send someone the document and they don't know anything about
attaching buttons to macros.
Thanks |
|
| Back to top |
|
 |
Google Sponsor

|
Posted: Fri Nov 16, 2007 7:19 pm Post subject: Advertisement |
|
|
|
|
| Back to top |
|
 |
Summer Guest
|
Posted: Sat Nov 17, 2007 12:13 am Post subject: Re: Macro doc + toolbar button via Email? |
|
|
It seems neither do you! - The document needs to be xxxx.dot template with
the macro attached to the vbe editor ALT F11 and the toolbar copy using
Organizer and attached to the template document.
The receiver needs to save as xxxx.dot onto their desktop and then right
click NEW and create a copy which should with reference to the xxxx.dot
template you sent and the macros....
Hope this helps....
"elle0612" <elle0612@discussions.microsoft.com> wrote in message
news:E9BFECB8-6FF9-46E7-ADF0-2AA917FDFCF0@microsoft.com...
| Quote: | Hi
I'm wondering if it is possible to Email a document with a macro attached,
to arrive at receiver complete with macro button on tool bar to run it.
I need to send someone the document and they don't know anything about
attaching buttons to macros.
Thanks |
|
|
| Back to top |
|
 |
elle0612 Guest
|
Posted: Sat Nov 17, 2007 10:01 am Post subject: Re: Macro doc + toolbar button via Email? |
|
|
Yes, I know most of that (not sure what Organizer is though).
Its true it was a document I sent not a template, but I was hoping the
document would open for the receiver without having to fiddle with trying to
attach buttons themselves.
This document was an example of something that will end up as a template in
the future, I didn't think I would have to do that at this stage.
thanks
"Summer" wrote:
| Quote: | It seems neither do you! - The document needs to be xxxx.dot template with
the macro attached to the vbe editor ALT F11 and the toolbar copy using
Organizer and attached to the template document.
The receiver needs to save as xxxx.dot onto their desktop and then right
click NEW and create a copy which should with reference to the xxxx.dot
template you sent and the macros....
Hope this helps....
"elle0612" <elle0612@discussions.microsoft.com> wrote in message
news:E9BFECB8-6FF9-46E7-ADF0-2AA917FDFCF0@microsoft.com...
Hi
I'm wondering if it is possible to Email a document with a macro attached,
to arrive at receiver complete with macro button on tool bar to run it.
I need to send someone the document and they don't know anything about
attaching buttons to macros.
Thanks
|
|
|
| Back to top |
|
 |
Doug Robbins - Word MVP Guest
|
Posted: Sat Nov 17, 2007 8:11 pm Post subject: Re: Macro doc + toolbar button via Email? |
|
|
See the article "Distributing macros to other users" at:
http://www.word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"elle0612" <elle0612@discussions.microsoft.com> wrote in message
news:CD018784-2F16-4AAA-935D-24DC5355048E@microsoft.com...
| Quote: | Yes, I know most of that (not sure what Organizer is though).
Its true it was a document I sent not a template, but I was hoping the
document would open for the receiver without having to fiddle with trying
to
attach buttons themselves.
This document was an example of something that will end up as a template
in
the future, I didn't think I would have to do that at this stage.
thanks
"Summer" wrote:
It seems neither do you! - The document needs to be xxxx.dot template
with
the macro attached to the vbe editor ALT F11 and the toolbar copy using
Organizer and attached to the template document.
The receiver needs to save as xxxx.dot onto their desktop and then right
click NEW and create a copy which should with reference to the xxxx.dot
template you sent and the macros....
Hope this helps....
"elle0612" <elle0612@discussions.microsoft.com> wrote in message
news:E9BFECB8-6FF9-46E7-ADF0-2AA917FDFCF0@microsoft.com...
Hi
I'm wondering if it is possible to Email a document with a macro
attached,
to arrive at receiver complete with macro button on tool bar to run it.
I need to send someone the document and they don't know anything about
attaching buttons to macros.
Thanks
|
|
|
| Back to top |
|
 |
elle0612 Guest
|
Posted: Wed Nov 21, 2007 11:15 pm Post subject: Re: Macro doc + toolbar button via Email? |
|
|
I have discovered a slight problem with this macro - this is the code, it is
meant to cut one selected table out whilst putting another in by means of an
assigned toolbar button.
Sub pastetable()
If Selection.Information(wdWithInTable) Then
Selection.Cut
ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=2,
NumColumns:= _
5, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
wdAutoFitFixed
With Selection.Tables(1)
If .Style <> "Table Grid" Then
.Style = "Table Grid"
End If
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = True
.ApplyStyleFirstColumn = True
.ApplyStyleLastColumn = True
End With
Selection.TypeText Text:="this"
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:="is"
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:="the"
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:="example"
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:="This"
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=4
Selection.TypeText Text:="is"
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:="example"
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:="of"
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:="macro"
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:="working"
Else
MsgBox "Please select a table."
End If
This is the error I am getting,
"The method or property is not available because the object is empty".
Now, if the cursor happens to be before or after the table, and the macro
button is pressed then the message box appears fine. But, if the cursor
happens to be in a table cell, and the macro button is pressed, then I get
the error message above. Any ideas how I can fix it.
Thanks
End Sub
"Doug Robbins - Word MVP" wrote:
| Quote: | See the article "Distributing macros to other users" at:
http://www.word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"elle0612" <elle0612@discussions.microsoft.com> wrote in message
news:CD018784-2F16-4AAA-935D-24DC5355048E@microsoft.com...
Yes, I know most of that (not sure what Organizer is though).
Its true it was a document I sent not a template, but I was hoping the
document would open for the receiver without having to fiddle with trying
to
attach buttons themselves.
This document was an example of something that will end up as a template
in
the future, I didn't think I would have to do that at this stage.
thanks
"Summer" wrote:
It seems neither do you! - The document needs to be xxxx.dot template
with
the macro attached to the vbe editor ALT F11 and the toolbar copy using
Organizer and attached to the template document.
The receiver needs to save as xxxx.dot onto their desktop and then right
click NEW and create a copy which should with reference to the xxxx.dot
template you sent and the macros....
Hope this helps....
"elle0612" <elle0612@discussions.microsoft.com> wrote in message
news:E9BFECB8-6FF9-46E7-ADF0-2AA917FDFCF0@microsoft.com...
Hi
I'm wondering if it is possible to Email a document with a macro
attached,
to arrive at receiver complete with macro button on tool bar to run it.
I need to send someone the document and they don't know anything about
attaching buttons to macros.
Thanks
|
|
|
| Back to top |
|
 |
Russ Guest
|
Posted: Fri Nov 23, 2007 11:57 pm Post subject: Re: Macro doc + toolbar button via Email? |
|
|
Question re-posted in another message thread.
<http://groups.google.com/group/microsoft.public.word.vba.beginners/browse_t
hread/thread/ab5b1e2b19d19d9a/62fb1b7ce765c3ab>
| Quote: | I have discovered a slight problem with this macro - this is the code, it is
meant to cut one selected table out whilst putting another in by means of an
assigned toolbar button.
Sub pastetable()
If Selection.Information(wdWithInTable) Then
Selection.Cut
ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=2,
NumColumns:= _
5, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
wdAutoFitFixed
With Selection.Tables(1)
If .Style <> "Table Grid" Then
.Style = "Table Grid"
End If
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = True
.ApplyStyleFirstColumn = True
.ApplyStyleLastColumn = True
End With
Selection.TypeText Text:="this"
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:="is"
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:="the"
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:="example"
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:="This"
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=4
Selection.TypeText Text:="is"
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:="example"
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:="of"
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:="macro"
Selection.MoveRight Unit:=wdCell
Selection.TypeText Text:="working"
Else
MsgBox "Please select a table."
End If
This is the error I am getting,
"The method or property is not available because the object is empty".
Now, if the cursor happens to be before or after the table, and the macro
button is pressed then the message box appears fine. But, if the cursor
happens to be in a table cell, and the macro button is pressed, then I get
the error message above. Any ideas how I can fix it.
Thanks
End Sub
"Doug Robbins - Word MVP" wrote:
See the article "Distributing macros to other users" at:
http://www.word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
"elle0612" <elle0612@discussions.microsoft.com> wrote in message
news:CD018784-2F16-4AAA-935D-24DC5355048E@microsoft.com...
Yes, I know most of that (not sure what Organizer is though).
Its true it was a document I sent not a template, but I was hoping the
document would open for the receiver without having to fiddle with trying
to
attach buttons themselves.
This document was an example of something that will end up as a template
in
the future, I didn't think I would have to do that at this stage.
thanks
"Summer" wrote:
It seems neither do you! - The document needs to be xxxx.dot template
with
the macro attached to the vbe editor ALT F11 and the toolbar copy using
Organizer and attached to the template document.
The receiver needs to save as xxxx.dot onto their desktop and then right
click NEW and create a copy which should with reference to the xxxx.dot
template you sent and the macros....
Hope this helps....
"elle0612" <elle0612@discussions.microsoft.com> wrote in message
news:E9BFECB8-6FF9-46E7-ADF0-2AA917FDFCF0@microsoft.com...
Hi
I'm wondering if it is possible to Email a document with a macro
attached,
to arrive at receiver complete with macro button on tool bar to run it.
I need to send someone the document and they don't know anything about
attaching buttons to macros.
Thanks
|
--
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|