![]() |
#1
|
|||
|
|||
![]()
Hello,
I am struggling with understanding of when (and how) to invoke a macro correctly in my intended workflow. My workflow goes:
Code:
Sub Document_New() ' ' Demo Macro ' ' Dim StrNm As String Dim DocSubject As String With ActiveDocument StrNm = "SWMS " & .Bookmarks("docnumber").Range.Text & " " & _ .Bookmarks("doctype").Range.Text & " - " & _ .Bookmarks("sitename").Range.Text & " - " & _ .Bookmarks("personname").Range.Text DocSubject = .Bookmarks("doctype").Range.Text .BuiltInDocumentProperties("Title") = StrNm .BuiltInDocumentProperties("Subject") = DocSubject End With With Application.Dialogs(wdDialogFileSaveAs) .Name = StrNm .Format = wdFormatPDF Options.DefaultFilePath(wdDocumentsPath) = "C:\folderA\folderb .Show End With End Sub
Regards from a bright and sunny Queensland. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
plaidma1 | Outlook | 1 | 05-03-2013 09:33 AM |
How to add a file menu item and invoke an EXE? | simplyarun | PowerPoint | 0 | 07-21-2011 01:59 AM |
![]() |
dawit | Word | 1 | 05-10-2011 09:47 PM |
![]() |
Nigel1985 | Word | 1 | 05-27-2010 07:19 PM |
![]() |
silviu | Office | 1 | 05-21-2009 11:12 AM |