A
Accounts
Hi,
I want to create a toolbar button which opens a new document using a
template, and then copies in data from fields from the previous
document.
When I try it however, non of the data is being brought over.
Does VB lose all the data stored in variables when it creates a new
document?
Or is there a new for VB to highlight, and then copy into the clipboard
the information stored at a particular bookmark in a document, so that
it can then paste it in the new dowcument at another bookmark?
This is the code I have already.
Documents.Add Template:="label.dot"
WordBasic.WW7_EditGoTo Destination:="Name"
WordBasic.Insert To_$
If Len(Attn$) > 1 Then
WordBasic.WW7_EditGoTo Destination:="Att"
WordBasic.Insert "Attention: " + Attn$
End If
WordBasic.WW7_EditGoTo Destination:="Address"
WordBasic.Insert address$
The data in the To_$, Attn$ and address$ variables are inputted via a
form from the original document, and then populate this document at the
bookmarks.
The button I want will then open the label template, and pop in the data
from the original document.
Its all WB code, but VB code would be nicer.
Thanks.
I want to create a toolbar button which opens a new document using a
template, and then copies in data from fields from the previous
document.
When I try it however, non of the data is being brought over.
Does VB lose all the data stored in variables when it creates a new
document?
Or is there a new for VB to highlight, and then copy into the clipboard
the information stored at a particular bookmark in a document, so that
it can then paste it in the new dowcument at another bookmark?
This is the code I have already.
Documents.Add Template:="label.dot"
WordBasic.WW7_EditGoTo Destination:="Name"
WordBasic.Insert To_$
If Len(Attn$) > 1 Then
WordBasic.WW7_EditGoTo Destination:="Att"
WordBasic.Insert "Attention: " + Attn$
End If
WordBasic.WW7_EditGoTo Destination:="Address"
WordBasic.Insert address$
The data in the To_$, Attn$ and address$ variables are inputted via a
form from the original document, and then populate this document at the
bookmarks.
The button I want will then open the label template, and pop in the data
from the original document.
Its all WB code, but VB code would be nicer.
Thanks.