Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
save QM code as a word file
#9
somethings need to beĀ  in a VARIANT

this works not sure if it is 100% correct.

Macro Macro36
Trigger Aw     Help - how to add the trigger to the macro
Code:
Copy      Help
Word.Range rng=doc.Sections.Item(1).Footers.Item(wdHeaderFooterPrimary).Range
rng.Text="page "
VARIANT FieldPage=wdFieldPage
VARIANT Direction=wdCollapseEnd
VARIANT FieldNumPages=wdFieldNumPages
rng.SetRange(rng rng)
rng.Collapse(Direction)
rng.Fields.Add(rng FieldPage)
rng.Collapse(Direction)
rng.SetRange(rng rng)
rng.InsertAfter(" of ")
rng.SetRange(rng rng)
rng.Collapse(Direction)
rng.Fields.Add(rng FieldNumPages)
rng.Collapse(Direction)
rng.SetRange(rng rng)
rng.InsertAfter(" Total ")
rng.SetRange(rng rng)
rng.Collapse(Direction)
doc.Sections.Item(1).Footers.Item(wdHeaderFooterPrimary).Range.Fields.Update
doc.Sections.Item(1).Footers.Item(wdHeaderFooterPrimary).Range.ParagraphFormat.Alignment = wdAlignParagraphCenter


Messages In This Thread
save QM code as a word file - by macman - 01-18-2021, 08:05 AM
RE: save QM code as a word file - by macman - 01-19-2021, 12:53 AM
RE: save QM code as a word file - by Kevin - 01-19-2021, 01:37 AM
RE: save QM code as a word file - by macman - 01-19-2021, 03:09 AM
RE: save QM code as a word file - by Kevin - 01-19-2021, 05:33 AM
RE: save QM code as a word file - by macman - 01-19-2021, 11:07 PM
RE: save QM code as a word file - by macman - 01-20-2021, 08:37 AM
RE: save QM code as a word file - by macman - 01-21-2021, 05:29 AM
RE: save QM code as a word file - by Kevin - 01-21-2021, 08:29 AM
RE: save QM code as a word file - by macman - 01-21-2021, 08:39 AM
RE: save QM code as a word file - by macman - 01-21-2021, 10:12 AM
RE: save QM code as a word file - by macman - 01-22-2021, 06:25 AM
RE: save QM code as a word file - by Kevin - 01-22-2021, 11:44 PM
RE: save QM code as a word file - by macman - 01-23-2021, 12:34 AM
RE: save QM code as a word file - by Kevin - 01-23-2021, 12:42 AM
RE: save QM code as a word file - by macman - 01-23-2021, 12:49 AM
RE: save QM code as a word file - by Kevin - 01-23-2021, 12:53 AM
RE: save QM code as a word file - by macman - 01-23-2021, 12:58 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)