#1
|
|||
|
|||
VBA Code for making "mailings" tab active
Hi Everyone,
I have a word doc that has the following code: Code:
Private Sub Document_New() CommandBars("Mail merge").Visible = True Dim sPath As String CommandBars("Mail merge").Visible = True With ActiveDocument sPath = .Path & "\Tracking Data v.2.accdb" With .MailMerge .OpenDataSource _ Name:=sPath, _ ConfirmConversions:=False, _ ReadOnly:=False, _ LinkToSource:=True, _ AddToRecentFiles:=False, _ Revert:=False, _ Format:=wdOpenFormatAuto, _ Connection:= _ "Provider=Microsoft.ACE.OLEDB.12.0; " & _ "User ID=Admin;" & _ "Password='';" & _ "Data Source=" & sPath & ";" & _ "Mode=Read;", _ SQLStatement:="SELECT * FROM `Farming_Table`", _ SQLStatement1:="", _ SubType:=wdMergeSubTypeAccess .ViewMailMergeFieldCodes = wdToggle End With End With End Sub |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wierd symbols inplace of "space", "indentation" etc | aka.bhagvanji | Word | 5 | 02-16-2012 11:50 AM |
create a hotkey for "add sender to blocked senders list" | mytoyo | Outlook | 0 | 03-29-2009 09:39 AM |
MYOB and "Item.Send error" Outlook message | peter_lambros | Outlook | 1 | 12-06-2008 08:24 AM |
"IF" "THEN" statements in Macros | mfgeng_iss | Misc | 0 | 10-04-2007 07:31 AM |
"open" or "open using" option not availa | ccd | Outlook | 0 | 09-22-2006 01:23 AM |