Hello!
I would like to merge 2 macros into 1, so that when I make the macro shortcut button it would do the 2 functions in just one click.
I'm trying to merge
Code:
Sub AutoNew()
Dim InvoiceFile As String, InvNum As String
'Save ini file in the Word startup folder.
InvoiceFile = Options.DefaultFilePath(wdStartupPath) & "\Invoice.ini"
'or, by using the following line, the Workgroup folder
'InvoiceFile = Options.DefaultFilePath(wdWorkgroupTemplatesPath) & "\Invoice.ini"
InvNum = System.PrivateProfileString(InvoiceFile, "InvoiceNumber", "InvNum")
'If there is no InvoiceNumber reference in the ini file
'Create one and set the number to 1, otherwise increment the number
If InvNum = "" Then
InvNum = 1
Else
InvNum = InvNum + 1
End If
System.PrivateProfileString(InvoiceFile, "InvoiceNumber", "InvNum") = InvNum
With ActiveDocument
.CustomDocumentProperties("InvNum") = InvNum
.Fields.Update
End With
End Sub
Code:
Sub ResetForm()
MsgBox "test"
Dim oFF As FormField
For Each oFF In ActiveDocument.Range.FormFields
Select Case oFF.Type
Case Is = wdFieldFormTextInput
oFF.Result = ""
Case Is = wdFieldFormDropDown
oFF.DropDown.Value = 1
Case Else
'Do Nothing
End Select
Next oFF
End Sub
Could this be done???/
Thank You for your help!!