FilePageSetupHeader in MS Project VBA project: Display image dynamically
Posted
by Anne Schuessler
on Stack Overflow
See other posts from Stack Overflow
or by Anne Schuessler
Published on 2010-05-24T07:53:54Z
Indexed on
2010/05/24
8:01 UTC
Read the original article
Hit count: 426
I want to display an image when printing a page from MS Page using the FilePageSetupHeader. It all works fine if I pass in the parameter for the Text property as a string as such
FilePageSetupHeader Alignment:=pjRight, Text:="&P""C:\filepath\image.gif"""
However, I'd prefer to be able to pass the filepath to the image to display as a variable. Somehow I can't get it right.
So if I try something like the following:
vImagePath = """&P""""" & prjFilePath & "\image.gif""""""
FilePageSetupHeader Alignment:=pjRight, Text:=vImagePath
it just displays the path as a string.
I'm pretty sure it boils down to something simple like escaping the quotes in the correct way, but I've been playing around with it for a while now and I can't seem to get it right.
Any idea how this works?
© Stack Overflow or respective owner